Browse Source

CMake: Move Interrogate.cmake's _LP64 detection to the top of the script, where it gets added to IGATE_FLAGS.

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

+ 6 - 4
cmake/macros/Interrogate.cmake

@@ -10,6 +10,12 @@
 
 
 set(IGATE_FLAGS -DCPPPARSER -D__cplusplus -Dvolatile -Dmutable -python-native)
 set(IGATE_FLAGS -DCPPPARSER -D__cplusplus -Dvolatile -Dmutable -python-native)
 
 
+# In addition, Interrogate needs to know if this is a 64-bit build:
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+  list(APPEND IGATE_FLAGS "-D_LP64")
+endif()
+
+
 # This is a list of regexes that are applied to every filename. If one of the
 # This is a list of regexes that are applied to every filename. If one of the
 # regexes matches, that file will not be passed to Interrogate.
 # regexes matches, that file will not be passed to Interrogate.
 set(INTERROGATE_EXCLUDE_REGEXES
 set(INTERROGATE_EXCLUDE_REGEXES
@@ -174,10 +180,6 @@ 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