Commit 8ff5aa0a authored by Emmanuel Thomé's avatar Emmanuel Thomé Committed by Alexander Kruppa

Adapt to cmake 3.0+ (which just made it to debian testing)

parent f97965a7
......@@ -123,7 +123,7 @@ if [ "$?" != "0" ] || ! [ -x "$cmake_path" ] ; then
echo "CMake not found" >&2
cmake_path=
# Recall that (some versions of) bash do not want quoting for regex patterns.
elif ! [[ "`"$cmake_path" --version`" =~ ^cmake\ version\ 2.[89] ]] ; then
elif [[ "`"$cmake_path" --version`" =~ ^cmake\ version\ [012] ]] && ! [[ "`"$cmake_path" --version`" =~ ^cmake\ version\ 2.[89] ]] ; then
echo "CMake found, but not with version 2.8 or newer" >&2
cmake_path=
fi
......
......@@ -2,6 +2,7 @@
add_dependencies(check sm)
# Get path to the sm binary and store in variable sm_path
get_property(sm_path TARGET sm PROPERTY LOCATION)
# see comment in tests/sieve/CMakeLists.txt
set(sm_path ${CADO_NFS_BINARY_DIR}/filter/sm)
add_test(testsm bash -c "\"${CMAKE_CURRENT_SOURCE_DIR}/testsm.sh\" \"${sm_path}\"")
......@@ -6,11 +6,16 @@ add_dependencies(check makefb las las_tracek las_kbucket las_mbucket)
# Get paths to the makefb and las binaries and store in variables
# makefb_path and las_path, resp.
get_property(makefb_path TARGET makefb PROPERTY LOCATION)
get_property(las_path TARGET las PROPERTY LOCATION)
get_property(las_tracek_path TARGET las_tracek PROPERTY LOCATION)
get_property(las_kbucket_path TARGET las_kbucket PROPERTY LOCATION)
get_property(las_mbucket_path TARGET las_mbucket PROPERTY LOCATION)
# for cmake pre-3.0, we did:
# get_property(makefb_path TARGET makefb PROPERTY LOCATION)
# now it seems to be forbidden with cmake 3.0+ (see cmake --help-policy
# CMP0026). The following is probably safe enough.
set(makefb_path ${CADO_NFS_BINARY_DIR}/sieve/makefb)
set(las_path ${CADO_NFS_BINARY_DIR}/sieve/las)
set(las_tracek_path ${CADO_NFS_BINARY_DIR}/sieve/las_tracek)
set(las_kbucket_path ${CADO_NFS_BINARY_DIR}/sieve/las_kbucket)
set(las_mbucket_path ${CADO_NFS_BINARY_DIR}/sieve/las_mbucket)
set(F9_roots "${CMAKE_CURRENT_BINARY_DIR}/F9.roots")
add_test(F9_makefbtest "${makefb_path}" -poly "${CADO_NFS_SOURCE_DIR}/params/F9.poly" -alim 2300000 -maxbits 10 -out "${F9_roots}")
......
......@@ -2,7 +2,9 @@
add_dependencies(check testbench)
# Get path to the testbench binary and store in variable testbench_path
get_property(testbench_path TARGET testbench PROPERTY LOCATION)
# see comment in tests/sieve/CMakeLists.txt
# get_property(testbench_path TARGET testbench PROPERTY LOCATION)
set(testbench_path ${CADO_NFS_BINARY_DIR}/sieve/ecm/testbench)
add_test(test_factor_pm1 bash -c "\"${CMAKE_CURRENT_SOURCE_DIR}/test_testbench.sh\" \"${testbench_path}\" \"${CMAKE_CURRENT_SOURCE_DIR}/test_factor_pm1_2_100_1000.inp\" -q -vf -vcf -pm1 100 1000")
add_test(test_factor_pp1_27 bash -c "\"${CMAKE_CURRENT_SOURCE_DIR}/test_testbench.sh\" \"${testbench_path}\" \"${CMAKE_CURRENT_SOURCE_DIR}/test_factor_pp1_27_100_1000.inp\" -q -vf -vcf -pp1_27 100 1000")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment