[libc-commits] [libc] 805f583 - [libc] Fix build when -DBUILD_SHARED_LIBS=On
Alex Brachet via libc-commits
libc-commits at lists.llvm.org
Wed Feb 26 09:19:59 PST 2020
Author: Alex Brachet
Date: 2020-02-26T12:19:09-05:00
New Revision: 805f5836d1bbd03dcc9de78881bd81dc8cb09cc4
URL: https://github.com/llvm/llvm-project/commit/805f5836d1bbd03dcc9de78881bd81dc8cb09cc4
DIFF: https://github.com/llvm/llvm-project/commit/805f5836d1bbd03dcc9de78881bd81dc8cb09cc4.diff
LOG: [libc] Fix build when -DBUILD_SHARED_LIBS=On
Reviewers: gchatelet, sivachandra
Reviewed By: gchatelet, sivachandra
Subscribers: libc-commits, mgorny, MaskRay, tschuett
Differential Revision: https://reviews.llvm.org/D75136
Added:
Modified:
libc/utils/UnitTest/CMakeLists.txt
libc/utils/testutils/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/utils/UnitTest/CMakeLists.txt b/libc/utils/UnitTest/CMakeLists.txt
index c6e5d9a11824..5c15e3f7fa4b 100644
--- a/libc/utils/UnitTest/CMakeLists.txt
+++ b/libc/utils/UnitTest/CMakeLists.txt
@@ -6,3 +6,4 @@ add_llvm_library(
)
target_include_directories(LibcUnitTest PUBLIC ${LIBC_SOURCE_DIR})
add_dependencies(LibcUnitTest standalone_cpp)
+target_link_libraries(LibcUnitTest PUBLIC libc_test_utils)
diff --git a/libc/utils/testutils/CMakeLists.txt b/libc/utils/testutils/CMakeLists.txt
index 966c44802c18..aab8d34dc2db 100644
--- a/libc/utils/testutils/CMakeLists.txt
+++ b/libc/utils/testutils/CMakeLists.txt
@@ -1,8 +1,10 @@
-add_library(
+if(CMAKE_HOST_UNIX)
+ set(EFFile ExecuteFunctionUnix.cpp)
+endif()
+
+add_llvm_library(
libc_test_utils
+ ${EFFile}
ExecuteFunction.h
+ LINK_COMPONENTS Support
)
-
-if(CMAKE_HOST_UNIX)
- target_sources(libc_test_utils PRIVATE ExecuteFunctionUnix.cpp)
-endif()
More information about the libc-commits
mailing list