[libcxx-commits] [libcxx] 7a804c0 - [libcxx] Consistently set CMAKE_STATIC_LIBRARY_PREFIX regardless of LIBCXX_ENABLE_STATIC
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 23 09:18:37 PDT 2021
Author: Martin Storsjö
Date: 2021-03-23T18:18:16+02:00
New Revision: 7a804c09798a7051bd9189a0e59d84ea30b1e337
URL: https://github.com/llvm/llvm-project/commit/7a804c09798a7051bd9189a0e59d84ea30b1e337
DIFF: https://github.com/llvm/llvm-project/commit/7a804c09798a7051bd9189a0e59d84ea30b1e337.diff
LOG: [libcxx] Consistently set CMAKE_STATIC_LIBRARY_PREFIX regardless of LIBCXX_ENABLE_STATIC
CMAKE_STATIC_LIBRARY_PREFIX affects the naming of all static libs (in
MSVC configurations), including c++experimental, which only is produced
as static regardless of LIBCXX_ENABLE_STATIC.
Differential Revision: https://reviews.llvm.org/D99176
Added:
Modified:
libcxx/src/CMakeLists.txt
Removed:
################################################################################
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 55fb1a6ed3c4..015f2a9e22a8 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -259,12 +259,13 @@ if (LIBCXX_ENABLE_SHARED)
endif()
endif()
+set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
+
# Build the static library.
if (LIBCXX_ENABLE_STATIC)
add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS})
target_link_libraries(cxx_static PUBLIC cxx-headers
PRIVATE ${LIBCXX_LIBRARIES})
- set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
set_target_properties(cxx_static
PROPERTIES
COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
More information about the libcxx-commits
mailing list