Skip to content

Commit

Permalink
Merge pull request #383 from stonier/patch-6
Browse files Browse the repository at this point in the history
Avoid creating nmake inference rule problems
  • Loading branch information
dirk-thomas committed Mar 13, 2013
2 parents efb9671 + 9f4a11d commit cda60bd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmake/test/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ function(catkin_run_tests_target type name xunit_filename)
if(NOT TARGET run_tests_${PROJECT_NAME})
add_custom_target(run_tests_${PROJECT_NAME})
# create hidden meta target which depends on hidden test targets which depend on clean_test_results
add_custom_target(.run_tests_${PROJECT_NAME})
add_custom_target(_run_tests_${PROJECT_NAME})
# run_tests depends on this hidden target hierarchy to clear test results before running all tests
add_dependencies(run_tests .run_tests_${PROJECT_NAME})
add_dependencies(run_tests _run_tests_${PROJECT_NAME})
endif()
# create meta target to trigger all tests of a specific type of a project
if(NOT TARGET run_tests_${PROJECT_NAME}_${type})
add_custom_target(run_tests_${PROJECT_NAME}_${type})
add_dependencies(run_tests_${PROJECT_NAME} run_tests_${PROJECT_NAME}_${type})
# hidden meta target which depends on hidden test targets which depend on clean_test_results
add_custom_target(.run_tests_${PROJECT_NAME}_${type})
add_dependencies(.run_tests_${PROJECT_NAME} .run_tests_${PROJECT_NAME}_${type})
add_custom_target(_run_tests_${PROJECT_NAME}_${type})
add_dependencies(_run_tests_${PROJECT_NAME} _run_tests_${PROJECT_NAME}_${type})
endif()
# create target for test execution
set(results ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME}/${xunit_filename})
Expand All @@ -70,8 +70,8 @@ function(catkin_run_tests_target type name xunit_filename)
add_dependencies(run_tests_${PROJECT_NAME}_${type}_${name} ${_testing_DEPENDENCIES})
endif()
# hidden test target which depends on building all tests and cleaning test results
add_custom_target(.run_tests_${PROJECT_NAME}_${type}_${name}
add_custom_target(_run_tests_${PROJECT_NAME}_${type}_${name}
COMMAND ${cmd})
add_dependencies(.run_tests_${PROJECT_NAME}_${type} .run_tests_${PROJECT_NAME}_${type}_${name})
add_dependencies(.run_tests_${PROJECT_NAME}_${type}_${name} clean_test_results tests ${_testing_DEPENDENCIES})
add_dependencies(_run_tests_${PROJECT_NAME}_${type} _run_tests_${PROJECT_NAME}_${type}_${name})
add_dependencies(_run_tests_${PROJECT_NAME}_${type}_${name} clean_test_results tests ${_testing_DEPENDENCIES})
endfunction()

0 comments on commit cda60bd

Please sign in to comment.