diff options
author | Brad King <brad.king@kitware.com> | 2008-01-21 18:30:17 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-21 18:30:17 -0500 |
commit | a28b197b11f4b647c67a6914c731077972449343 (patch) | |
tree | 48e3cad97678cc49ef2b63c210d4e712a4dc58fa /Modules/CMakeCXXCompiler.cmake.in | |
parent | 19d22f6105ae064378e9175bed6a01b197e2eb5d (diff) | |
download | cmake-a28b197b11f4b647c67a6914c731077972449343.tar.gz |
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.in | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index b3a84dd1dd..81380c9ef9 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) |