File tree 4 files changed +12
-6
lines changed
4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ function(add_benchmark_test name source_file)
137
137
add_executable (${libcxx_target} EXCLUDE_FROM_ALL ${source_file} )
138
138
add_dependencies (${libcxx_target} cxx cxx-headers google-benchmark-libcxx)
139
139
add_dependencies (cxx-benchmarks ${libcxx_target} )
140
+ target_link_libraries (${libcxx_target} ${LIBCXX_LIBRARIES} )
140
141
if (LIBCXX_ENABLE_SHARED)
141
142
target_link_libraries (${libcxx_target} cxx_shared)
142
143
else ()
Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ if (LIBCXX_ENABLE_SHARED)
241
241
if (COMMAND llvm_setup_rpath)
242
242
llvm_setup_rpath(cxx_shared)
243
243
endif ()
244
- target_link_libraries (cxx_shared ${LIBCXX_LIBRARIES} )
244
+ target_link_libraries (cxx_shared PRIVATE ${LIBCXX_LIBRARIES} )
245
245
set_target_properties (cxx_shared
246
246
PROPERTIES
247
247
LINK_FLAGS "${LIBCXX_LINK_FLAGS} "
@@ -265,7 +265,7 @@ endif()
265
265
# Build the static library.
266
266
if (LIBCXX_ENABLE_STATIC)
267
267
add_library (cxx_static STATIC ${cxx_static_sources} )
268
- target_link_libraries (cxx_static ${LIBCXX_LIBRARIES} )
268
+ target_link_libraries (cxx_static PRIVATE ${LIBCXX_LIBRARIES} )
269
269
set (CMAKE_STATIC_LIBRARY_PREFIX "lib" )
270
270
set_target_properties (cxx_static
271
271
PROPERTIES
@@ -461,3 +461,8 @@ if (NOT CMAKE_CONFIGURATION_TYPES AND (LIBCXX_INSTALL_LIBRARY OR
461
461
-P "${LIBCXX_BINARY_DIR} /cmake_install.cmake" )
462
462
add_custom_target (install -libcxx DEPENDS install -cxx)
463
463
endif ()
464
+
465
+ # TODO: This is needed by cxx-benchmarks but this variable isn't
466
+ # available outside of the scope of this file so we need to export
467
+ # it. This is not necessarily the cleanest solution.
468
+ set (LIBCXX_LIBRARIES ${LIBCXX_LIBRARIES} PARENT_SCOPE)
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ if (LIBCXXABI_ENABLE_SHARED)
189
189
if (COMMAND llvm_setup_rpath)
190
190
llvm_setup_rpath(cxxabi_shared)
191
191
endif ()
192
- target_link_libraries (cxxabi_shared ${LIBCXXABI_LIBRARIES} ${LIBCXXABI_SHARED_LIBRARIES} )
192
+ target_link_libraries (cxxabi_shared PRIVATE ${LIBCXXABI_LIBRARIES} ${LIBCXXABI_SHARED_LIBRARIES} )
193
193
set_target_properties (cxxabi_shared
194
194
PROPERTIES
195
195
CXX_EXTENSIONS
@@ -226,7 +226,7 @@ if (LIBCXXABI_ENABLE_STATIC)
226
226
endif ()
227
227
endif ()
228
228
add_library (cxxabi_static STATIC ${cxxabi_static_sources} )
229
- target_link_libraries (cxxabi_static ${LIBCXXABI_LIBRARIES} ${LIBCXXABI_STATIC_LIBRARIES} )
229
+ target_link_libraries (cxxabi_static PRIVATE ${LIBCXXABI_LIBRARIES} ${LIBCXXABI_STATIC_LIBRARIES} )
230
230
set_target_properties (cxxabi_static
231
231
PROPERTIES
232
232
CXX_EXTENSIONS
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ if (LIBUNWIND_ENABLE_SHARED)
146
146
if (COMMAND llvm_setup_rpath)
147
147
llvm_setup_rpath(unwind_shared)
148
148
endif ()
149
- target_link_libraries (unwind_shared ${libraries} )
149
+ target_link_libraries (unwind_shared PRIVATE ${libraries} )
150
150
set_target_properties (unwind_shared
151
151
PROPERTIES
152
152
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS} "
@@ -162,7 +162,7 @@ endif()
162
162
# Build the static library.
163
163
if (LIBUNWIND_ENABLE_STATIC)
164
164
add_library (unwind_static STATIC ${unwind_static_sources} )
165
- target_link_libraries (unwind_static ${libraries} )
165
+ target_link_libraries (unwind_static PRIVATE ${libraries} )
166
166
set_target_properties (unwind_static
167
167
PROPERTIES
168
168
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS} "
You can’t perform that action at this time.
0 commit comments