summaryrefslogtreecommitdiffstats
path: root/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@cool.haxx.se>2020-03-04 06:31:59 (GMT)
committerBrad King <brad.king@kitware.com>2020-03-04 19:34:23 (GMT)
commit735ea3001ae98636a4cb7caf15a40960c0da39a1 (patch)
treedc511f0892ccd186358795757e9abb23aa567e1d /lib/CMakeLists.txt
parentb26487c663ec29d972fd61adc2b14ac5880b78c7 (diff)
downloadCMake-735ea3001ae98636a4cb7caf15a40960c0da39a1.zip
CMake-735ea3001ae98636a4cb7caf15a40960c0da39a1.tar.gz
CMake-735ea3001ae98636a4cb7caf15a40960c0da39a1.tar.bz2
curl 2020-03-04 (b8d13668)
Code extracted from: https://github.com/curl/curl.git at commit b8d1366852fd0034374c5de1e4968c7a224f77cc (curl-7_69_0).
Diffstat (limited to 'lib/CMakeLists.txt')
-rw-r--r--lib/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index eca9a8a..e73efb9 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -20,7 +20,6 @@ list(APPEND HHEADERS
if(MSVC)
list(APPEND CSOURCES libcurl.rc)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127")
endif()
# SET(CSOURCES
@@ -97,6 +96,12 @@ endif()
set_target_properties(${LIB_NAME} PROPERTIES PREFIX "")
set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "")
+if(CURL_HAS_LTO)
+ set_target_properties(${LIB_NAME} PROPERTIES
+ INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE
+ INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE)
+endif()
+
if(WIN32)
if(BUILD_SHARED_LIBS)
# Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib"