-
Notifications
You must be signed in to change notification settings - Fork 25
Yoshimi edited this page Oct 3, 2018
·
3 revisions
When you fail to compile software by CMake, you should directly set CMAKE_<lang>_COMPILER
.
Here, <lang>
means a language and is set as C
for C compiler, CXX
for C++ compiler, Fortran
for Fortran compiler. For example, when you want to use g++
, you should set the variable
by cmake -DCMAKE_CXX_COMPILER=g++
.
You can also set the compile option by setting CMAKE_<lang>_FLAGS_RELEASE
. For example, you can set the compile option by cmake -DCMAKE_C_FLAGS_RELEASE="-O3 -DNDEBUG -DHAVE_SSE2"
.