summaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorJohann Klähn <kljohann@gmail.com>2014-09-09 20:43:16 +0200
committerJohann Klähn <kljohann@gmail.com>2014-09-10 00:40:36 +0200
commit5931a9377795ecc7d48f11c4d5dbebc158f1b00e (patch)
tree41616c086fd3205cf1c4c4ee0bf3d55456fb40a2 /test/CMakeLists.txt
parent6323fe52b7621c21f5e2af7fd9bce344a37a4ea1 (diff)
downloadfork-ledger-5931a9377795ecc7d48f11c4d5dbebc158f1b00e.tar.gz
fork-ledger-5931a9377795ecc7d48f11c4d5dbebc158f1b00e.tar.bz2
fork-ledger-5931a9377795ecc7d48f11c4d5dbebc158f1b00e.zip
avoid policy warning with recent CMake versions
See `cmake --help-policy CMP0026` with CMake ≥ 3.0.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt14
1 files changed, 6 insertions, 8 deletions
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
+ $<TARGET_FILE:ledger> ${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 $<TARGET_FILE:ledger> --file ${TestFile})
# set_target_properties(check PROPERTIES DEPENDS ${_class}Test_${TestFile_Name})
# endforeach()
#endif()