[test-suite] r338644 - Revert "cmake: Use generator expression to get target path"
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 1 15:20:12 PDT 2018
Author: matze
Date: Wed Aug 1 15:20:12 2018
New Revision: 338644
URL: http://llvm.org/viewvc/llvm-project?rev=338644&view=rev
Log:
Revert "cmake: Use generator expression to get target path"
It seems this patch has problems with older cmake versions, reverting
for now.
This reverts commit r338620.
Modified:
test-suite/trunk/cmake/modules/TestFile.cmake
test-suite/trunk/cmake/modules/TestSuite.cmake
Modified: test-suite/trunk/cmake/modules/TestFile.cmake
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/TestFile.cmake?rev=338644&r1=338643&r2=338644&view=diff
==============================================================================
--- test-suite/trunk/cmake/modules/TestFile.cmake (original)
+++ test-suite/trunk/cmake/modules/TestFile.cmake Wed Aug 1 15:20:12 2018
@@ -82,7 +82,3 @@ function(llvm_add_test testfile executab
# flush the test script
set(TESTSCRIPT "" PARENT_SCOPE)
endfunction()
-
-macro(llvm_add_test_for_target target)
- llvm_add_test($<TARGET_FILE_DIR:${target}>/${target}.test $<TARGET_FILE:${target}>)
-endmacro()
Modified: test-suite/trunk/cmake/modules/TestSuite.cmake
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/TestSuite.cmake?rev=338644&r1=338643&r2=338644&view=diff
==============================================================================
--- test-suite/trunk/cmake/modules/TestSuite.cmake (original)
+++ test-suite/trunk/cmake/modules/TestSuite.cmake Wed Aug 1 15:20:12 2018
@@ -18,14 +18,14 @@ macro(llvm_test_executable target)
# Note that we cannot use target_link_libraries() here because that one
# only interprets inputs starting with '-' as flags.
append_target_flags(LINK_LIBRARIES ${target} ${LDFLAGS})
- set(target_path $<TARGET_FILE:${target}>)
+ set(target_path ${CMAKE_CURRENT_BINARY_DIR}/${target})
if(TEST_SUITE_PROFILE_USE)
append_target_flags(COMPILE_FLAGS ${target} -fprofile-instr-use=${target_path}.profdata)
append_target_flags(LINK_LIBRARIES ${target} -fprofile-instr-use=${target_path}.profdata)
endif()
set_property(GLOBAL APPEND PROPERTY TEST_SUITE_TARGETS ${target})
- llvm_add_test_for_target(${target})
+ llvm_add_test(${CMAKE_CURRENT_BINARY_DIR}/${target}.test ${target_path})
test_suite_add_build_dependencies(${target})
endmacro()
More information about the llvm-commits
mailing list