diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-05-10 23:11:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-10 23:11:24 +0200 |
commit | bc9c989f61b0f7e346d7bd688b4af8480bd3264b (patch) | |
tree | ec8c8945e2ad7b85e5a1179f0f2e88d1a0f38c9e /CMakeLists.txt | |
parent | d3f14b7a8bcba9a71b7008a5b78abdfd4b70cb34 (diff) | |
parent | 5c5d280dd547958a37824809b7a038efbb3aee3b (diff) |
Merge pull request #621 from nadiaholmquist/fix/lto-ldflag
Add -flto as link flag, also fix missing <string> include in main.cpp causing the build to fail with GCC10
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 048dd44..e3f9cb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ endif() if(ENABLE_LTO) add_compile_options(-O3 -flto) + add_link_options(-flto) set(CMAKE_AR "gcc-ar") set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcs <TARGET> <LINK_FLAGS> <OBJECTS>") set(CMAKE_C_ARCHIVE_FINISH true) |