Commit 6478cd4e authored by GILLES Sebastien's avatar GILLES Sebastien

#1217 Fix the compiler choice: it wasn't working as expected (namely command...

#1217 Fix the compiler choice: it wasn't working as expected (namely command line may supersede the Paths file).
parent 6922a04f
......@@ -32,8 +32,14 @@ RelWithDebInfo MinSizeRel.")
endif()
# Set C and CXX compilers from the values read in the setting file. Might be overridden in command line.
set(CMAKE_C_COMPILER ${CC} CACHE STRING "C compiler (or the Mpi wrapper over it).")
set(CMAKE_CXX_COMPILER ${CXX} CACHE STRING "C++ compiler (or the Mpi wrapper over it).")
if (NOT DEFINED CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER ${MPI_CC})
endif()
if (NOT DEFINED CMAKE_CXX_COMPILER)
set(CMAKE_CXX_COMPILER ${MPI_CXX})
endif()
# ===================================================================================================================
......@@ -41,6 +47,10 @@ set(CMAKE_CXX_COMPILER ${CXX} CACHE STRING "C++ compiler (or the Mpi wrapper ove
# ===================================================================================================================
project( "MoReFEM_CMAKE")
MESSAGE("CC: " ${CC})
MESSAGE("CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER})
set_property(GLOBAL PROPERTY USE_FOLDERS OFF)
......
# Choose C and C++ compilers. You might also specifies here clang static analyzer (paths to ccc-analyzer and c++-analyzer respectively) to perform static analysis of the code.
set(CC /Users/Shared/LibraryVersions/llvm-clang/Openmpi/bin/mpicc )
set(CXX /Users/Shared/LibraryVersions/llvm-clang/Openmpi/bin/mpic++ )
set(MPI_CC /Users/Shared/LibraryVersions/llvm-clang/Openmpi/bin/mpicc )
set(MPI_CXX /Users/Shared/LibraryVersions/llvm-clang/Openmpi/bin/mpic++ )
# Choose either STATIC or SHARED.
set(LIBRARY_TYPE SHARED)
set(LIBRARY_TYPE STATIC)
# Whether a unique library is built for MoReFEM core libraries or on the contrary if it is splitted in modules.
set(BUILD_MOREFEM_UNIQUE_LIBRARY False)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment