[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 337/411: cmake: correctly handle linker flags for static libs
From: |
gnunet |
Subject: |
[gnurl] 337/411: cmake: correctly handle linker flags for static libs |
Date: |
Wed, 13 Jan 2021 01:22:32 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 760e854348196d0c62afc7a5b023c62eced45b92
Author: Tobias Hieta <tobias@plex.tv>
AuthorDate: Tue Nov 10 10:45:31 2020 +0100
cmake: correctly handle linker flags for static libs
curl CMake was setting the the EXE flags for static libraries which made
the /manifest:no flag ended up when linking the static library, which is
not a valid flag for lib.exe or llvm-lib.exe and caused llvm-lib to exit
with an error.
The better way to handle this is to make sure that we pass the correct
linker flags to CMAKE_STATIC_LINKER_FLAGS instead.
Reviewed-by: Jakub Zakrzewski
Closes #6195
---
CMakeLists.txt | 1 +
lib/CMakeLists.txt | 4 ----
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f51d0331..29c588bcd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -776,6 +776,7 @@ if(CMAKE_USE_GSSAPI)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_COMPILER_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}
${GSS_LINKER_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
+ set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS}
${GSS_LINKER_FLAGS}")
list(APPEND CURL_LIBS ${GSS_LIBRARIES})
else()
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 8f5121b27..ca4710e06 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -88,10 +88,6 @@ add_library(
ALIAS ${LIB_NAME}
)
-if(MSVC AND NOT BUILD_SHARED_LIBS)
- set_target_properties(${LIB_NAME} PROPERTIES STATIC_LIBRARY_FLAGS
${CMAKE_EXE_LINKER_FLAGS})
-endif()
-
if(NOT BUILD_SHARED_LIBS)
set_target_properties(${LIB_NAME} PROPERTIES INTERFACE_COMPILE_DEFINITIONS
CURL_STATICLIB)
endif()
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 298/411: CI/tests: enable test target on TravisCI for CMake builds, (continued)
- [gnurl] 298/411: CI/tests: enable test target on TravisCI for CMake builds, gnunet, 2021/01/12
- [gnurl] 358/411: CI/cirrus: simplify logic for disabled tests, gnunet, 2021/01/12
- [gnurl] 370/411: docs/INTERNALS: remove reference to Curl_sendf(), gnunet, 2021/01/12
- [gnurl] 336/411: cmake: don't pass -fvisibility=hidden to clang-cl on Windows, gnunet, 2021/01/12
- [gnurl] 338/411: httpput-postfields.c: new example doing PUT with POSTFIELDS, gnunet, 2021/01/12
- [gnurl] 276/411: CI/github: work-around for brew breakage on macOS, gnunet, 2021/01/12
- [gnurl] 303/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 293/411: gnutls: fix memory leaks (certfields memory wasn't released), gnunet, 2021/01/12
- [gnurl] 316/411: examples: fix comment syntax, gnunet, 2021/01/12
- [gnurl] 283/411: CMake: make BUILD_TESTING dependent option, gnunet, 2021/01/12
- [gnurl] 337/411: cmake: correctly handle linker flags for static libs,
gnunet <=
- [gnurl] 291/411: tool_operate: --retry for HTTP 408 responses too, gnunet, 2021/01/12
- [gnurl] 361/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 315/411: hsts: Remove pointless call to free in errorpath, gnunet, 2021/01/12
- [gnurl] 367/411: Makefile.m32: add support for UNICODE builds, gnunet, 2021/01/12
- [gnurl] 285/411: configure: use pkgconfig to find openSSL when cross-compiling, gnunet, 2021/01/12
- [gnurl] 354/411: cmake: make CURL_ZLIB a tri-state variable, gnunet, 2021/01/12
- [gnurl] 357/411: mailmap: Daniel Hwang, gnunet, 2021/01/12
- [gnurl] 265/411: CMake: store IDN2 information in curl_config.h, gnunet, 2021/01/12
- [gnurl] 351/411: KNOWN_BUGS: cmake autodetects cert paths when cross-compiling, gnunet, 2021/01/12
- [gnurl] 222/411: build-wolfssl: fix build with Visual Studio 2019, gnunet, 2021/01/12