From 8cd41a48af6b6bb95aa04fc21f1df656c6c99b0b Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Mon, 3 Feb 2014 11:54:51 -0700 Subject: [PATCH] CMake: Detect 64-bit vs. 32-bit when running Interrogate. --- cmake/macros/Interrogate.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/macros/Interrogate.cmake b/cmake/macros/Interrogate.cmake index e4c4c03af4..19d678a8e6 100644 --- a/cmake/macros/Interrogate.cmake +++ b/cmake/macros/Interrogate.cmake @@ -174,6 +174,10 @@ function(interrogate_sources target output database module) if("${CMAKE_CXX_FLAGS_${build_type}}" MATCHES ".*NDEBUG.*") list(APPEND define_flags "-DNDEBUG") endif() + # In addition, Interrogate needs to know if this is a 64-bit build: + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + list(APPEND define_flags "-D_LP64") + endif() # CMake offers no way to directly depend on the composite files from here, # because the composite files are created in a different directory from