summaryrefslogtreecommitdiff
path: root/Modules/CMakeTestCCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-21 18:30:17 -0500
committerBrad King <brad.king@kitware.com>2008-01-21 18:30:17 -0500
commita28b197b11f4b647c67a6914c731077972449343 (patch)
tree48e3cad97678cc49ef2b63c210d4e712a4dc58fa /Modules/CMakeTestCCompiler.cmake
parent19d22f6105ae064378e9175bed6a01b197e2eb5d (diff)
downloadcmake-a28b197b11f4b647c67a6914c731077972449343.tar.gz
ENH: Generalize the check for sizeof void* to detect more ABI information.
Diffstat (limited to 'Modules/CMakeTestCCompiler.cmake')
-rw-r--r--Modules/CMakeTestCCompiler.cmake17
1 files changed, 9 insertions, 8 deletions
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index 68c1640489..2a64f7c0c5 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)