ENH: move full path compiler to internal and not just advanced
This commit is contained in:
parent
ae5a80c795
commit
d9a74e1b1e
|
@ -31,6 +31,7 @@ IF(NOT CMAKE_C_COMPILER)
|
||||||
FIND_PROGRAM(CMAKE_C_COMPILER_FULLPATH NAMES ${CMAKE_C_COMPILER_LIST} )
|
FIND_PROGRAM(CMAKE_C_COMPILER_FULLPATH NAMES ${CMAKE_C_COMPILER_LIST} )
|
||||||
GET_FILENAME_COMPONENT(CMAKE_C_COMPILER_INIT
|
GET_FILENAME_COMPONENT(CMAKE_C_COMPILER_INIT
|
||||||
${CMAKE_C_COMPILER_FULLPATH} NAME)
|
${CMAKE_C_COMPILER_FULLPATH} NAME)
|
||||||
|
SET(CMAKE_C_COMPILER_FULLPATH "${CMAKE_C_COMPILER_FULLPATH}" CACHE INTERNAL "full path to the compiler cmake found")
|
||||||
ENDIF(NOT CMAKE_C_COMPILER_INIT)
|
ENDIF(NOT CMAKE_C_COMPILER_INIT)
|
||||||
|
|
||||||
SET(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_INIT} CACHE STRING "C compiler")
|
SET(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_INIT} CACHE STRING "C compiler")
|
||||||
|
@ -57,4 +58,4 @@ ENDIF(NOT CMAKE_COMPILER_RETURN)
|
||||||
# configure variables set in this file for fast reload later on
|
# configure variables set in this file for fast reload later on
|
||||||
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
|
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
|
||||||
${CMAKE_BINARY_DIR}/CMakeCCompiler.cmake IMMEDIATE)
|
${CMAKE_BINARY_DIR}/CMakeCCompiler.cmake IMMEDIATE)
|
||||||
MARK_AS_ADVANCED(CMAKE_AR CMAKE_C_COMPILER_FULLPATH)
|
MARK_AS_ADVANCED(CMAKE_AR)
|
||||||
|
|
|
@ -31,6 +31,7 @@ IF(NOT CMAKE_CXX_COMPILER)
|
||||||
FIND_PROGRAM(CMAKE_CXX_COMPILER_FULLPATH NAMES ${CMAKE_CXX_COMPILER_LIST})
|
FIND_PROGRAM(CMAKE_CXX_COMPILER_FULLPATH NAMES ${CMAKE_CXX_COMPILER_LIST})
|
||||||
GET_FILENAME_COMPONENT(CMAKE_CXX_COMPILER_INIT
|
GET_FILENAME_COMPONENT(CMAKE_CXX_COMPILER_INIT
|
||||||
${CMAKE_CXX_COMPILER_FULLPATH} NAME)
|
${CMAKE_CXX_COMPILER_FULLPATH} NAME)
|
||||||
|
SET(CMAKE_CXX_COMPILER_FULLPATH "${CMAKE_CXX_COMPILER_FULLPATH}" CACHE INTERNAL "full path to the compiler cmake found")
|
||||||
ENDIF(NOT CMAKE_CXX_COMPILER_INIT)
|
ENDIF(NOT CMAKE_CXX_COMPILER_INIT)
|
||||||
SET(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_INIT}
|
SET(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_INIT}
|
||||||
CACHE STRING "C++ compiler")
|
CACHE STRING "C++ compiler")
|
||||||
|
@ -49,7 +50,6 @@ ENDIF(NOT CMAKE_COMPILER_RETURN)
|
||||||
# configure all variables set in this file
|
# configure all variables set in this file
|
||||||
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
|
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
|
||||||
${CMAKE_BINARY_DIR}/CMakeCXXCompiler.cmake IMMEDIATE)
|
${CMAKE_BINARY_DIR}/CMakeCXXCompiler.cmake IMMEDIATE)
|
||||||
MARK_AS_ADVANCED(CMAKE_CXX_COMPILER_FULLPATH)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue