mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fix LTO support (#4884)
Apparently the `check_ipo_supported` flag must be called after `project` is called
This commit is contained in:
parent
d03151d8d6
commit
63b53656b1
1 changed files with 10 additions and 10 deletions
|
@ -29,10 +29,19 @@ option(CHATTERINO_PLUGINS "Enable EXPERIMENTAL plugin support in Chatterino" OFF
|
|||
option(CHATTERINO_UPDATER "Enable update checks" ON)
|
||||
mark_as_advanced(CHATTERINO_UPDATER)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "tests")
|
||||
endif()
|
||||
if(BUILD_BENCHMARKS)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "benchmarks")
|
||||
endif()
|
||||
|
||||
project(chatterino VERSION 2.4.6)
|
||||
|
||||
if(CHATTERINO_LTO)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT CHATTERINO_ENABLE_LTO OUTPUT IPO_ERROR)
|
||||
message(STATUS "LTO: Enabled (Supported: ${CHATTERINO_ENABLE_LTO})")
|
||||
message(STATUS "LTO: Enabled (Supported: ${CHATTERINO_ENABLE_LTO} - ${IPO_ERROR})")
|
||||
else()
|
||||
message(STATUS "LTO: Disabled")
|
||||
endif()
|
||||
|
@ -43,15 +52,6 @@ else()
|
|||
set(MAJOR_QT_VERSION "5")
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTS)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "tests")
|
||||
endif()
|
||||
if(BUILD_BENCHMARKS)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "benchmarks")
|
||||
endif()
|
||||
|
||||
project(chatterino VERSION 2.4.6)
|
||||
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
find_program(SCCACHE_PROGRAM sccache)
|
||||
if (SCCACHE_PROGRAM)
|
||||
|
|
Loading…
Reference in a new issue