summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCCompiler.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeCCompiler.cmake.in')
-rw-r--r--Modules/CMakeCCompiler.cmake.in14
1 files changed, 11 insertions, 3 deletions
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index 6a7fef8..e334c47 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -23,6 +23,14 @@ SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_C_LINKER_PREFERENCE 10)
-# 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_C_SIZEOF_DATA_PTR "@CMAKE_C_SIZEOF_DATA_PTR@")
+SET(CMAKE_C_COMPILER_ABI "@CMAKE_C_COMPILER_ABI@")
+
+IF(CMAKE_C_SIZEOF_DATA_PTR)
+ SET(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
+ENDIF(CMAKE_C_SIZEOF_DATA_PTR)
+
+IF(CMAKE_C_COMPILER_ABI)
+ SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
+ENDIF(CMAKE_C_COMPILER_ABI)