File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.8 )
1
+ cmake_minimum_required (VERSION 3.9 )
2
2
project (ccls LANGUAGES CXX )
3
3
4
4
option (USE_SYSTEM_RAPIDJSON "Use system RapidJSON instead of the git submodule if exists" ON )
@@ -30,6 +30,13 @@ set_property(TARGET ccls PROPERTY CXX_STANDARD 17)
30
30
set_property (TARGET ccls PROPERTY CXX_STANDARD_REQUIRED ON )
31
31
set_property (TARGET ccls PROPERTY CXX_EXTENSIONS OFF )
32
32
33
+ # Build using LTO if the copmiler supports it
34
+ include (CheckIPOSupported )
35
+ check_ipo_supported (RESULT ipo OUTPUT error )
36
+ if (ipo )
37
+ set_property (TARGET ccls PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE )
38
+ endif ()
39
+
33
40
# CMake sets MSVC for both MSVC and Clang(Windows)
34
41
if (MSVC )
35
42
# Common MSVC/Clang(Windows) options
You can’t perform that action at this time.
0 commit comments