diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-10-23 20:53:53 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-10-23 20:53:53 (GMT) |
commit | fa782867b33a8a5569d88de5b1f0b5f968e3cd6f (patch) | |
tree | b1f69679d18c58433efa0671d205e9641e0eb91a /Modules/CMakeDetermineCXXCompiler.cmake | |
parent | f6a70573b0c87c285bc798e479435c9a3c1d1fe6 (diff) | |
download | CMake-fa782867b33a8a5569d88de5b1f0b5f968e3cd6f.zip CMake-fa782867b33a8a5569d88de5b1f0b5f968e3cd6f.tar.gz CMake-fa782867b33a8a5569d88de5b1f0b5f968e3cd6f.tar.bz2 |
closer to removing autoconf
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 5b09e85..2f0a029 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -2,7 +2,8 @@ # NOTE, a generator may set CMAKE_CXX_COMPILER before # loading this file to force a compiler. -FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES $ENV{CXX} c++ g++ CC aCC cl bcc PATHS /bin /usr/bin /usr/local/bin ) +FIND_PROGRAM(CMAKE_CXX_COMPILER_FULLPATH NAMES $ENV{CXX} c++ g++ CC aCC cl bcc ) +GET_FILENAME_COMPONENT(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_FULLPATH} NAME_WE) # test to see if the cxx compiler is gnu EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS -E ${CMAKE_ROOT}/Modules/CMakeTestGNU.c OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN) @@ -12,3 +13,5 @@ IF(NOT CMAKE_COMPILER_RETURN) SET(CMAKE_COMPILER_IS_GNUGXX 1) ENDIF(${CMAKE_COMPILER_OUTPUT} MATCHES ".*THIS_IS_GNU.*" ) ENDIF(NOT CMAKE_COMPILER_RETURN) + +SET(CMAKE_CXX_AR ${CMAKE_AR}) |