Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10188


Ignore:
Timestamp:
Jan 10, 2015, 4:39:15 PM (10 years ago)
Author:
landauf
Message:

change cmake policy in order to avoid warning because we currently can't solve this in another way.
added new build target to build tests without executing them.

Location:
code/trunk/test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/test/CMakeLists.txt

    r9667 r10188  
    3434ENABLE_TESTING()
    3535
     36# A target to execute tests. This override the native 'test' target of cmake and allows us to
     37# define dependences (i.e. to let cmake build the tests before executing them)
     38IF (POLICY CMP0037)
     39  CMAKE_POLICY(PUSH)
     40  CMAKE_POLICY(SET CMP0037 OLD) # we currently have to override the original 'test' target until cmake provides a better way to define dependencies to the test target
     41ENDIF()
    3642ADD_CUSTOM_TARGET(test COMMAND ${CMAKE_CTEST_COMMAND} "$(ARGS)" COMMENT "Running tests")
     43IF (POLICY CMP0037)
     44  CMAKE_POLICY(POP) # restore policy settings
     45ENDIF()
     46
     47# A target to build all tests
     48ADD_CUSTOM_TARGET(all_tests)
     49ADD_DEPENDENCIES(test all_tests) # build tests before executing them
    3750
    3851CONFIGURE_FILE("CTestCustom.cmake" "CTestCustom.cmake" @ONLY)
  • code/trunk/test/core/CMakeLists.txt

    r9639 r10188  
    2828    object/WeakPtrTest.cc
    2929)
    30 ADD_DEPENDENCIES(test core_test)
     30ADD_DEPENDENCIES(all_tests core_test)
    3131
    3232ADD_TEST(core_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/core_test --gtest_output=xml)
  • code/trunk/test/util/CMakeLists.txt

    r9529 r10188  
    3131    output/SubcontextOutputListenerTest.cc
    3232)
    33 ADD_DEPENDENCIES(test util_test)
     33ADD_DEPENDENCIES(all_tests util_test)
    3434
    3535ADD_TEST(util_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/util_test --gtest_output=xml)
Note: See TracChangeset for help on using the changeset viewer.