Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LTO support #4884

Merged
merged 2 commits into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down