From 5931a9377795ecc7d48f11c4d5dbebc158f1b00e Mon Sep 17 00:00:00 2001 From: Johann Klähn Date: Tue, 9 Sep 2014 20:43:16 +0200 Subject: avoid policy warning with recent CMake versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See `cmake --help-policy CMP0026` with CMake ≥ 3.0. --- test/CMakeLists.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'test/CMakeLists.txt') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0f19ae6f..21d27c7d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,8 +6,6 @@ if (NOT PROCESSORS EQUAL 0) set(CTEST_BUILD_FLAGS -j${JOBS}) endif() -get_target_property(LEDGER_LOCATION ledger LOCATION) - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} ${CTEST_BUILD_FLAGS}) add_subdirectory(unit) @@ -23,9 +21,9 @@ macro(add_ledger_harness_tests _class) get_filename_component(TestFile_Name ${TestFile} NAME_WE) string(FIND ${TestFile_Name} "_py" TestFile_IsPythonTest) if ((TestFile_IsPythonTest EQUAL -1) OR HAVE_BOOST_PYTHON) - add_test(${_class}Test_${TestFile_Name} - ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/RegressTests.py - ${LEDGER_LOCATION} ${PROJECT_SOURCE_DIR} + add_test(NAME ${_class}Test_${TestFile_Name} + COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/RegressTests.py + $ ${PROJECT_SOURCE_DIR} ${TestFile} ${TEST_PYTHON_FLAGS}) set_target_properties(check PROPERTIES DEPENDS ${_class}Test_${TestFile_Name}) @@ -44,9 +42,9 @@ add_subdirectory(regress) # file(GLOB ${_class}_TESTS ${PROJECT_SOURCE_DIR}/doc/*.texi) # foreach(TestFile ${${_class}_TESTS}) # get_filename_component(TestFile_Name ${TestFile} NAME_WE) -# add_test(${_class}Test_${TestFile_Name} -# ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/DocTests.py -# --ledger ${LEDGER_LOCATION} --file ${TestFile}) +# add_test(NAME ${_class}Test_${TestFile_Name} +# COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/DocTests.py +# --ledger $ --file ${TestFile}) # set_target_properties(check PROPERTIES DEPENDS ${_class}Test_${TestFile_Name}) # endforeach() #endif() -- cgit v1.2.3