Ver Fonte

BUG: Replace non-bootstrap command with macro

  - The GET_TEST_PROPERTY command does not exist during bootstrap.
  - Instead of lots of conditionals, replace it with a macro.
Brad King há 17 anos atrás
pai
commit
e245d4ea11
1 ficheiros alterados com 9 adições e 0 exclusões
  1. 9 0
      Tests/CMakeLists.txt

+ 9 - 0
Tests/CMakeLists.txt

@@ -12,6 +12,15 @@ MACRO(ADD_TEST_MACRO NAME COMMAND)
     --test-command ${COMMAND})
 ENDMACRO(ADD_TEST_MACRO)
 
+# Support bootstrap builds.  When CMake 2.6 is required we can switch
+# to using the get_property command which is in bootstrap.  Note that
+# that command will return empty instead of NOTFOUND if the property
+# is not set.
+IF(NOT COMMAND GET_TEST_PROPERTY)
+  MACRO(GET_TEST_PROPERTY test prop var)
+    SET(${var} "")
+  ENDMACRO(GET_TEST_PROPERTY)
+ENDIF(NOT COMMAND GET_TEST_PROPERTY)
 
 # Testing
 IF(BUILD_TESTING)