mirror of
https://github.com/curl/curl.git
synced 2026-08-04 07:59:59 +03:00
CMake: Add support for CMAKE_LTO option.
This enables Link Time Optimization. LTO is a proven technique for optimizing across compilation units. Closes #4799
This commit is contained in:
parent
f128c00a99
commit
4ccf7622db
3 changed files with 30 additions and 0 deletions
|
|
@ -46,6 +46,12 @@ add_executable(
|
|||
${CURL_FILES}
|
||||
)
|
||||
|
||||
if(CURL_HAS_LTO)
|
||||
set_target_properties(${EXE_NAME} PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE)
|
||||
endif()
|
||||
|
||||
source_group("curlX source files" FILES ${CURLX_CFILES})
|
||||
source_group("curl source files" FILES ${CURL_CFILES})
|
||||
source_group("curl header files" FILES ${CURL_HFILES})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue