summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerABI.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2010-07-12 19:48:51 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-09-01 17:08:14 (GMT)
commitf794d589a44918c905911eb7688d69350922c6b3 (patch)
treec5893a8eff5b26496740c5e4b77e47ca73268c8b /Modules/CMakeDetermineCompilerABI.cmake
parent48b5b855934be341c02139c0bed88c35c1b40d8f (diff)
downloadCMake-f794d589a44918c905911eb7688d69350922c6b3.zip
CMake-f794d589a44918c905911eb7688d69350922c6b3.tar.gz
CMake-f794d589a44918c905911eb7688d69350922c6b3.tar.bz2
Make --strict-mode option, and integrate with cmake-gui
Diffstat (limited to 'Modules/CMakeDetermineCompilerABI.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake14
1 files changed, 12 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index d6df305..aa21c31 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -24,9 +24,13 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Compile the ABI identification source.
SET(BIN "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeDetermineCompilerABI_${lang}.bin")
+ SET(CMAKE_FLAGS )
+ IF(DEFINED CMAKE_${lang}_VERBOSE_FLAG)
+ SET(CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}")
+ ENDIF()
TRY_COMPILE(CMAKE_DETERMINE_${lang}_ABI_COMPILED
${CMAKE_BINARY_DIR} ${src}
- CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}"
+ CMAKE_FLAGS "${CMAKE_FLAGS}"
"-DCMAKE_${lang}_STANDARD_LIBRARIES="
OUTPUT_VARIABLE OUTPUT
COPY_FILE "${BIN}"
@@ -58,10 +62,16 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Parse implicit linker information for this language, if available.
SET(implicit_dirs "")
SET(implicit_libs "")
+ SET(MULTI_ARCH FALSE)
+ IF(DEFINED CMAKE_OSX_ARCHITECTURES)
+ IF( "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";" )
+ SET(MULTI_ARCH TRUE)
+ ENDIF()
+ ENDIF()
IF(CMAKE_${lang}_VERBOSE_FLAG
# Implicit link information cannot be used explicitly for
# multiple OS X architectures, so we skip it.
- AND NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";"
+ AND NOT MULTI_ARCH
# Skip this with Xcode for now.
AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log)