Merge pull request #61 from v4hn/cmake-3.0-test-target

explicitly allow "test" target with cmake 3.0
This commit is contained in:
Dirk Thomas 2014-07-03 09:46:44 -07:00
commit 227c6b852a
1 changed files with 5 additions and 0 deletions

View File

@ -317,7 +317,12 @@ macro(rosbuild_init)
add_custom_target(tests)
endif()
# The 'test' target runs all but the future tests
cmake_policy(PUSH)
if(POLICY CMP0037)
cmake_policy(SET CMP0037 OLD)
endif()
add_custom_target(test)
cmake_policy(POP)
# We need to build tests before running them. Addition of this
# dependency also ensures that old test results get cleaned prior to a
# new test run.