diff options
author | Brad King <brad.king@kitware.com> | 2008-01-21 23:30:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-21 23:30:17 (GMT) |
commit | a28b197b11f4b647c67a6914c731077972449343 (patch) | |
tree | 48e3cad97678cc49ef2b63c210d4e712a4dc58fa /Modules/CMakeTestCCompiler.cmake | |
parent | 19d22f6105ae064378e9175bed6a01b197e2eb5d (diff) | |
download | CMake-a28b197b11f4b647c67a6914c731077972449343.zip CMake-a28b197b11f4b647c67a6914c731077972449343.tar.gz CMake-a28b197b11f4b647c67a6914c731077972449343.tar.bz2 |
ENH: Generalize the check for sizeof void* to detect more ABI information.
Diffstat (limited to 'Modules/CMakeTestCCompiler.cmake')
-rw-r--r-- | Modules/CMakeTestCCompiler.cmake | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index 68c1640..2a64f7c 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -40,14 +40,15 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS) "Determining if the C compiler works passed with " "the following output:\n${OUTPUT}\n\n") ENDIF(C_TEST_WAS_RUN) - INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake) - # Check the size of void*. This used to be "void *" but icc expands the *. - CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P) SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "") - # re-configure this file CMakeCCompiler.cmake so that it gets - # the value for CMAKE_SIZEOF_VOID_P - # configure variables set in this file for fast reload later on - CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake IMMEDIATE) + + # Try to identify the ABI and configure it into CMakeCCompiler.cmake + INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake) + CMAKE_DETERMINE_COMPILER_ABI(C ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c) + CONFIGURE_FILE( + ${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake + @ONLY + ) ENDIF(NOT CMAKE_C_COMPILER_WORKS) |