Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorTue Ly <lntue@google.com>2022-05-08 20:58:05 +0300
committerTue Ly <lntue@google.com>2022-05-08 20:58:05 +0300
commit6d92f4022dcf8b9a6d1479e612db56341090c9a4 (patch)
treee2249483bfbf4674bb65d51a02ee0d0dd684ecef /libc
parent13f358376a597077e93e11653b51648d4976b181 (diff)
[libc][Obvious] Fix cmake usage of list PREPEND (unavailable pre-3.15).
Diffstat (limited to 'libc')
-rw-r--r--libc/cmake/modules/LLVMLibCTestRules.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 3a1b9891e988..b1a34fed63b7 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -147,7 +147,7 @@ function(add_libc_unittest target_name)
endif()
# Test object files will depend on LINK_LIBRARIES passed down from `add_fp_unittest`
- list(PREPEND LIBC_UNITTEST_LINK_LIBRARIES ${link_object_files})
+ set(link_libraries ${link_object_files} ${LIBC_UNITTEST_LINK_LIBRARIES})
set_target_properties(${fq_target_name}
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
@@ -159,12 +159,12 @@ function(add_libc_unittest target_name)
# LibcUnitTest and libc_test_utils should not depend on anything in LINK_LIBRARIES.
if(NO_LIBC_UNITTEST_TEST_MAIN)
- list(APPEND LIBC_UNITTEST_LINK_LIBRARIES LibcUnitTest libc_test_utils)
+ list(APPEND link_libraries LibcUnitTest libc_test_utils)
else()
- list(APPEND LIBC_UNITTEST_LINK_LIBRARIES LibcUnitTest LibcUnitTestMain libc_test_utils)
+ list(APPEND link_libraries LibcUnitTest LibcUnitTestMain libc_test_utils)
endif()
- target_link_libraries(${fq_target_name} PRIVATE ${LIBC_UNITTEST_LINK_LIBRARIES})
+ target_link_libraries(${fq_target_name} PRIVATE ${link_libraries})
if(NOT LIBC_UNITTEST_NO_RUN_POSTBUILD)
add_custom_command(