Merge pull request #333 from oynqr/build/lto
This commit is contained in:
commit
8c98cc9458
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -131,24 +131,24 @@ jobs:
|
|||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
if: runner.os != 'Linux' && runner.os != 'Windows'
|
if: runner.os != 'Linux' && runner.os != 'Windows'
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja
|
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -G Ninja
|
||||||
|
|
||||||
- name: Configure CMake on Windows
|
- name: Configure CMake on Windows
|
||||||
if: runner.os == 'Windows' && matrix.portable != true
|
if: runner.os == 'Windows' && matrix.portable != true
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DLauncher_PORTABLE=OFF -G Ninja
|
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_PORTABLE=OFF -G Ninja
|
||||||
|
|
||||||
- name: Configure CMake on Windows portable
|
- name: Configure CMake on Windows portable
|
||||||
if: runner.os == 'Windows' && matrix.portable == true
|
if: runner.os == 'Windows' && matrix.portable == true
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja
|
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -G Ninja
|
||||||
|
|
||||||
- name: Configure CMake on Linux
|
- name: Configure CMake on Linux
|
||||||
if: runner.os == 'Linux' && matrix.portable != true
|
if: runner.os == 'Linux' && matrix.portable != true
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DLauncher_PORTABLE=OFF -G Ninja
|
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DLauncher_PORTABLE=OFF -DENABLE_LTO=ON -G Ninja
|
||||||
|
|
||||||
- name: Configure CMake on Linux Portable
|
- name: Configure CMake on Linux Portable
|
||||||
if: runner.os == 'Linux' && matrix.portable == true
|
if: runner.os == 'Linux' && matrix.portable == true
|
||||||
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,7 +1,7 @@
|
|||||||
[submodule "depends/libnbtplusplus"]
|
[submodule "depends/libnbtplusplus"]
|
||||||
path = libraries/libnbtplusplus
|
path = libraries/libnbtplusplus
|
||||||
url = https://github.com/MultiMC/libnbtplusplus.git
|
url = https://github.com/PolyMC/libnbtplusplus.git
|
||||||
pushurl = git@github.com:MultiMC/libnbtplusplus.git
|
pushurl = git@github.com:PolyMC/libnbtplusplus.git
|
||||||
|
|
||||||
[submodule "libraries/quazip"]
|
[submodule "libraries/quazip"]
|
||||||
path = libraries/quazip
|
path = libraries/quazip
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.9.4)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# In Qt 5.1+ we have our own main() function, don't autolink to qtmain on Windows
|
# In Qt 5.1+ we have our own main() function, don't autolink to qtmain on Windows
|
||||||
@ -43,6 +43,22 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type")
|
|||||||
# Fix build with Qt 5.13
|
# Fix build with Qt 5.13
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
|
||||||
|
|
||||||
|
option(ENABLE_LTO "Enable Link Time Optimization" off)
|
||||||
|
|
||||||
|
if(ENABLE_LTO)
|
||||||
|
include(CheckIPOSupported)
|
||||||
|
check_ipo_supported(RESULT ipo_supported OUTPUT ipo_error)
|
||||||
|
|
||||||
|
if(ipo_supported AND (CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel"))
|
||||||
|
message(STATUS "IPO / LTO enabled")
|
||||||
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
|
elseif(ipo_supported)
|
||||||
|
message(STATUS "Not enabling IPO / LTO on debug builds")
|
||||||
|
else()
|
||||||
|
message(STATUS "IPO / LTO not supported: <${ipo_error}>")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
##################################### Set Application options #####################################
|
##################################### Set Application options #####################################
|
||||||
|
|
||||||
######## Set URLs ########
|
######## Set URLs ########
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.9.4)
|
||||||
project(LocalPeer)
|
project(LocalPeer)
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Core Network REQUIRED)
|
find_package(Qt5 COMPONENTS Core Network REQUIRED)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.9.4)
|
||||||
project(iconfix)
|
project(iconfix)
|
||||||
|
|
||||||
find_package(Qt5Core REQUIRED QUIET)
|
find_package(Qt5Core REQUIRED QUIET)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.9.4)
|
||||||
project(launcher Java)
|
project(launcher Java)
|
||||||
find_package(Java 1.7 REQUIRED COMPONENTS Development)
|
find_package(Java 1.7 REQUIRED COMPONENTS Development)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.6)
|
cmake_minimum_required(VERSION 3.9.4)
|
||||||
|
|
||||||
string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BUILD_DIR}" IS_IN_SOURCE_BUILD)
|
string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BUILD_DIR}" IS_IN_SOURCE_BUILD)
|
||||||
if(IS_IN_SOURCE_BUILD)
|
if(IS_IN_SOURCE_BUILD)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.9.4)
|
||||||
project(launcher Java)
|
project(launcher Java)
|
||||||
find_package(Java 1.7 REQUIRED COMPONENTS Development)
|
find_package(Java 1.7 REQUIRED COMPONENTS Development)
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit dc72a20b7efd304d12af2025223fad07b4b78464
|
Subproject commit 129be45a7f91920e76673af104534d215c497d85
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.9.4)
|
||||||
project(optional-bare)
|
project(optional-bare)
|
||||||
|
|
||||||
add_library(optional-bare INTERFACE)
|
add_library(optional-bare INTERFACE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.9.4)
|
||||||
project(rainbow)
|
project(rainbow)
|
||||||
|
|
||||||
find_package(Qt5Core REQUIRED QUIET)
|
find_package(Qt5Core REQUIRED QUIET)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.9.4)
|
||||||
project(xz-embedded LANGUAGES C)
|
project(xz-embedded LANGUAGES C)
|
||||||
|
|
||||||
option(XZ_BUILD_BCJ "Build xz-embedded with BCJ support (native binary optimization)" OFF)
|
option(XZ_BUILD_BCJ "Build xz-embedded with BCJ support (native binary optimization)" OFF)
|
||||||
|
Loading…
Reference in New Issue
Block a user