get_filename_component(baseNAME ${src} NAME_WE)
set(TEST_INPUT "${LAPACK_SOURCE_DIR}/BLAS/${baseNAME}.in")
add_executable(${name} ${src})
- get_target_property(TEST_LOC ${name} LOCATION)
target_link_libraries(${name} blas)
if(EXISTS "${TEST_INPUT}")
- add_test(BLAS-${name} "${CMAKE_COMMAND}"
- -DTEST=${TEST_LOC}
+ add_test(NAME BLAS-${name} COMMAND "${CMAKE_COMMAND}"
+ -DTEST=$<TARGET_FILE:${name}>
-DINPUT=${TEST_INPUT}
-DINTDIR=${CMAKE_CFG_INTDIR}
-P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
else()
- add_test(BLAS-${name} "${CMAKE_COMMAND}"
- -DTEST=${TEST_LOC}
+ add_test(NAME BLAS-${name} COMMAND "${CMAKE_COMMAND}"
+ -DTEST=$<TARGET_FILE:${name}>
-DINTDIR=${CMAKE_CFG_INTDIR}
-P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
endif()
macro(add_lapack_test output input target)
set(TEST_INPUT "${LAPACK_SOURCE_DIR}/TESTING/${input}")
set(TEST_OUTPUT "${LAPACK_BINARY_DIR}/TESTING/${output}")
- get_target_property(TEST_LOC ${target} LOCATION)
string(REPLACE "." "_" input_name ${input})
set(testName "${target}_${input_name}")
if(EXISTS "${TEST_INPUT}")
- add_test(LAPACK-${testName} "${CMAKE_COMMAND}"
- -DTEST=${TEST_LOC}
+ add_test(NAME LAPACK-${testName} COMMAND "${CMAKE_COMMAND}"
+ -DTEST=$<TARGET_FILE:${target}>
-DINPUT=${TEST_INPUT}
-DOUTPUT=${TEST_OUTPUT}
-DINTDIR=${CMAKE_CFG_INTDIR}