Browse Source

Suppress "unused variable" warning for external CMake project also.

Yao Wei Tjong 姚伟忠 12 years ago
parent
commit
b85a0b3305
2 changed files with 9 additions and 8 deletions
  1. 9 0
      Source/CMake/Modules/Urho3D-CMake-magic.cmake
  2. 0 8
      Source/CMakeLists.txt

+ 9 - 0
Source/CMake/Modules/Urho3D-CMake-magic.cmake

@@ -199,6 +199,15 @@ include (GenerateExportHeader)
 # Determine the project root directory
 # Determine the project root directory
 get_filename_component (PROJECT_ROOT_DIR ${PROJECT_SOURCE_DIR} PATH)
 get_filename_component (PROJECT_ROOT_DIR ${PROJECT_SOURCE_DIR} PATH)
 
 
+# Reference supported build options that are potentially not being referenced due to platform or build type branching to suppress "unused variable" warning
+if (ENABLE_SAMPLES AND ENABLE_EXTRAS AND ENABLE_TOOLS AND
+    ENABLE_MINIDUMPS AND USE_MKLINK AND USE_STATIC_RUNTIME AND
+    ENABLE_64BIT AND
+    SCP_TO_TARGET AND
+    ANDROID_ABI AND
+    ENABLE_SAFE_LUA)
+endif()
+
 # Override builtin macro and function to suit our need, always generate header file regardless of target type...
 # Override builtin macro and function to suit our need, always generate header file regardless of target type...
 macro (_DO_SET_MACRO_VALUES TARGET_LIBRARY)
 macro (_DO_SET_MACRO_VALUES TARGET_LIBRARY)
     set (DEFINE_DEPRECATED)
     set (DEFINE_DEPRECATED)

+ 0 - 8
Source/CMakeLists.txt

@@ -119,11 +119,3 @@ if (NOT USE_OPENGL EQUAL DOXYFILE_USE_OPENGL OR ${PROJECT_ROOT_DIR}/Docs/Doxyfil
     endif ()
     endif ()
     configure_file (${PROJECT_ROOT_DIR}/Docs/Doxyfile.in ${PROJECT_ROOT_DIR}/Doxyfile) 
     configure_file (${PROJECT_ROOT_DIR}/Docs/Doxyfile.in ${PROJECT_ROOT_DIR}/Doxyfile) 
 endif ()
 endif ()
-
-# Reference supported build options that are potentially not being referenced due to platform or build type branching to suppress "unused variable" warning
-if (ENABLE_SAMPLES AND ENABLE_EXTRAS AND ENABLE_TOOLS AND
-    ENABLE_MINIDUMPS AND USE_MKLINK AND USE_STATIC_RUNTIME AND
-    SCP_TO_TARGET AND
-    ANDROID_ABI AND
-    ENABLE_SAFE_LUA)
-endif()