Debian Codegraph @

debian/patches/butcher_cmake.patch

raw
1 --- a/CMakeLists.txt
2 +++ b/CMakeLists.txt
3 @@ -1,5 +1,5 @@
4 # Required cmake version
5 -cmake_minimum_required(VERSION 3.1.0)
6 +cmake_minimum_required(VERSION 3.30.0)
7
8 # Put the include dirs which are in the source or build tree
9 # before all other include dirs, so the headers in the sources
10 @@ -25,46 +25,6 @@
11 include(ConfigureChecks.cmake)
12
13
14 -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
15 - # using Clang
16 -
17 - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -march=native -mtune=native -pedantic -stdlib=libc++")
18 -
19 -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
20 - # using G++
21 -
22 - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
23 - message(FATAL_ERROR "G++ 5.1 or higher required")
24 - endif()
25 -
26 - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -march=native -mtune=native -pedantic -Wno-variadic-macros" )
27 -
28 -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
29 - # using Visual Studio
30 -
31 - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0)
32 - message(FATAL_ERROR "Visual Studio 2015 or higher required")
33 - endif()
34 -
35 -
36 - # DEBUG compiler flags:
37 - # /Zi create debugging information PDB file
38 - # /Od disable optimizations
39 - # /Oy- do not suppress frame pointers (recommended for debugging)
40 - # /MTd use statically linked, thread-safe, debug CRT libs (Magic Builder set this flag when build)
41 - #
42 - # RELEASE compiler flags:
43 - # /MT use statically linked, thread-safe CRT libs (Magic Builder set this flag when build)
44 - # /GS- no Buffer Security Check
45 - #
46 - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Zi /Od /Oy-")
47 - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
48 -
49 - # Explaining of linker flags and why enable pdb with debug info for Release build is on:
50 - # https://www.wintellect.com/correctly-creating-native-c-release-build-pdbs
51 - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
52 -endif()
53 -
54 subdirs(src conf man files)
55 if(WITH_LUA)
56 add_subdirectory(lua)