Browse Source

CMake: Detect 64-bit vs. 32-bit when running Interrogate.

Sam Edwards 12 years ago
parent
commit
8cd41a48af
1 changed files with 4 additions and 0 deletions
  1. 4 0
      cmake/macros/Interrogate.cmake

+ 4 - 0
cmake/macros/Interrogate.cmake

@@ -174,6 +174,10 @@ function(interrogate_sources target output database module)
     if("${CMAKE_CXX_FLAGS_${build_type}}" MATCHES ".*NDEBUG.*")
     if("${CMAKE_CXX_FLAGS_${build_type}}" MATCHES ".*NDEBUG.*")
       list(APPEND define_flags "-DNDEBUG")
       list(APPEND define_flags "-DNDEBUG")
     endif()
     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,
     # CMake offers no way to directly depend on the composite files from here,
     # because the composite files are created in a different directory from
     # because the composite files are created in a different directory from