Fix variable in CMake to avoid conflicts in top-level

This commit is contained in:
DrasLorus 2022-04-27 15:12:58 +02:00
parent 12b7d8942a
commit 7844c3bdd1
Signed by: moniere
GPG key ID: 188DD5B072181C0F

View file

@ -157,15 +157,14 @@ if (ENABLE_TESTING)
catch_discover_tests (cordicabs_tb WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data) catch_discover_tests (cordicabs_tb WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data)
if (ENABLE_XILINX) if (ENABLE_XILINX)
find_file (INPUT_DAT_TB input.dat HINTS data REQUIRED) find_file (INPUT_DAT_TB input.dat HINTS data NO_CACHE REQUIRED)
if (CMAKE_VERSION VERSION_LESS 3.19.0) if (CMAKE_VERSION VERSION_LESS 3.19.0)
add_test (NAME "\"Xilinx C-Simulation Testbench\"" COMMAND cordicabs_xilinx_tb set (TEST_NAME "\"Xilinx C-Simulation Testbench CordicAbs\"")
${INPUT_DAT_TB}
)
else () else ()
cmake_policy (SET CMP0110 NEW) cmake_policy (SET CMP0110 NEW)
add_test (NAME "Xilinx C-Simulation Testbench" COMMAND cordicabs_xilinx_tb ${INPUT_DAT_TB}) set (TEST_NAME "Xilinx C-Simulation Testbench CordicAbs")
endif () endif ()
add_test (NAME ${TEST_NAME} COMMAND cordicabs_xilinx_tb ${INPUT_DAT_TB})
if (XILINX_COSIM) if (XILINX_COSIM)
set ( set (