summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompiler.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-21 23:30:17 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-21 23:30:17 (GMT)
commita28b197b11f4b647c67a6914c731077972449343 (patch)
tree48e3cad97678cc49ef2b63c210d4e712a4dc58fa /Modules/CMakeCXXCompiler.cmake.in
parent19d22f6105ae064378e9175bed6a01b197e2eb5d (diff)
downloadCMake-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/CMakeCXXCompiler.cmake.in')
-rw-r--r--Modules/CMakeCXXCompiler.cmake.in14
1 files changed, 11 insertions, 3 deletions
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index b3a84dd..81380c9 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -23,6 +23,14 @@ SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm)
SET(CMAKE_CXX_LINKER_PREFERENCE 30)
-# save the size of void* in case where cache is removed
-# and the this file is still around
-SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@)
+# Save compiler ABI information.
+SET(CMAKE_CXX_SIZEOF_DATA_PTR "@CMAKE_CXX_SIZEOF_DATA_PTR@")
+SET(CMAKE_CXX_COMPILER_ABI "@CMAKE_CXX_COMPILER_ABI@")
+
+IF(CMAKE_CXX_SIZEOF_DATA_PTR)
+ SET(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
+ENDIF(CMAKE_CXX_SIZEOF_DATA_PTR)
+
+IF(CMAKE_CXX_COMPILER_ABI)
+ SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
+ENDIF(CMAKE_CXX_COMPILER_ABI)