diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-11-08 22:24:45 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-11-08 22:24:45 (GMT) |
commit | f54bfe467c8988c7281a493a39b609e719c20c81 (patch) | |
tree | f3c440ca2202f490209db5bd7b0206fa6e153cd1 /Modules/CMakeDetermineCXXCompiler.cmake | |
parent | f5d95fb078ec48755762931fe2882ed1cbe1171e (diff) | |
download | CMake-f54bfe467c8988c7281a493a39b609e719c20c81.zip CMake-f54bfe467c8988c7281a493a39b609e719c20c81.tar.gz CMake-f54bfe467c8988c7281a493a39b609e719c20c81.tar.bz2 |
store the compiler in the cache
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index cd03d35..823877f 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -5,8 +5,12 @@ # the cmake variable CMAKE_GENERATOR_CXX which can be defined by a generator # as a default compiler -FIND_PROGRAM(CMAKE_CXX_COMPILER_FULLPATH NAMES $ENV{CXX} ${CMAKE_GENERATOR_CXX} c++ g++ CC aCC cl bcc ) -GET_FILENAME_COMPONENT(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_FULLPATH} NAME_WE) +IF(NOT CMAKE_CXX_COMPILER) + FIND_PROGRAM(CMAKE_CXX_COMPILER_FULLPATH NAMES $ENV{CXX} ${CMAKE_GENERATOR_CXX} c++ g++ CC aCC cl bcc ) + GET_FILENAME_COMPONENT(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_FULLPATH} NAME_WE) + SET(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER} CACHE STRING "C++ compiler") +ENDIF(NOT CMAKE_CXX_COMPILER) +MARK_AS_ADVANCED(CMAKE_CXX_COMPILER) # set this to notfound right after so that it is searched for each time this # file is included |