28
Apr
0
[Cmake] infinite loop with cmake and mpicxx
You fail to set the compiler for mpi with cmake because you get an infinite loop :
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_CXX_COMPILER= /usr/bin/c++
Well the solution is very simple.
You cannot set the compiler :
SET(CMAKE_CXX_COMPILER mpicxx)
After setting the project :
project(myproject CXX)
So it has to be :
# MPI option has to be set before project if( USE_MPI ) SET(CMAKE_CXX_COMPILER mpicxx) endif() # Project Infos project(myproject CXX) #then usual cmakefile ...
Enjoyed reading this post?
Subscribe to the RSS feed and have all new posts delivered straight to you.
Subscribe to the RSS feed and have all new posts delivered straight to you.
