When used with environment variable CXX unset, clang support, and a gentoo-specific cmake rule file that reads:
Code: Select all
SET (CMAKE_AR /usr/bin/x86_64-pc-linux-gnu-ar CACHE FILEPATH "Archive manager" FORCE)
SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> -O2 -pipe -march=corei7 <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE)
SET (CMAKE_C_COMPILER /usr/lib64/ccache/bin/x86_64-pc-linux-gnu-gcc CACHE FILEPATH "C compiler" FORCE)
SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE)
SET (CMAKE_CXX_COMPILER /usr/bin/g++-4.7.1 CACHE FILEPATH "C++ compiler" FORCE)
SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE)
SET (CMAKE_RANLIB /usr/bin/x86_64-pc-linux-gnu-ranlib CACHE FILEPATH "Archive index generator" FORCE)
SET (PKG_CONFIG_EXECUTABLE /usr/bin/x86_64-pc-linux-gnu-pkg-config CACHE FILEPATH "pkg-config executable" FORCE)
The culprit is here: that CMakeLists.txt
Code: Select all
if(DEFINED ENV{CXX})
message("-- Using CXX $ENV{CXX}")
set(CMAKE_CXX_COMPILER $ENV{CXX} )
endif()
if(DEFINED ENV{CC})
message("-- Using CC $ENV{CC}")
set(CMAKE_CC_COMPILER $ENV{CC} )
endif()
It is also dangerous, because in my particular case, where CXX environment variable is different from the CMAKE_CXX_COMPILER that I set in the rule file, it causes configure to be run over and over again. Compilation never occurs.
Patch here: http://qdii.dodges.it/codelite-honor-CXX.patch