about summary refs log tree commit diff homepage
path: root/cmake/cxx_flags_override.cmake
diff options
context:
space:
mode:
authorMartin Nowack <m.nowack@imperial.ac.uk>2023-02-23 21:47:53 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2023-03-17 22:38:16 +0000
commit3ef5c9d0cd51babb7c4ec2d7bb76d0cb7e47a65c (patch)
treea2cb9e4c193d674b4f49634d0f546b65ce547860 /cmake/cxx_flags_override.cmake
parent7a4a9b9b47d2fe9b90cee95d68d89faa24a118d4 (diff)
downloadklee-3ef5c9d0cd51babb7c4ec2d7bb76d0cb7e47a65c.tar.gz
[cmake] Use LLVM's CMake functionality only
LLVM became more complex, use LLVM's CMake functionality directly instead
of replicating this behaviour in KLEE's build system.

Use the correct build flags provided by LLVM itself.
This is influenced by the way LLVM is built in the first place.

Remove older CMake support (< 3.0).
Diffstat (limited to 'cmake/cxx_flags_override.cmake')
-rw-r--r--cmake/cxx_flags_override.cmake25
1 files changed, 0 insertions, 25 deletions
diff --git a/cmake/cxx_flags_override.cmake b/cmake/cxx_flags_override.cmake
deleted file mode 100644
index 0e3946fe..00000000
--- a/cmake/cxx_flags_override.cmake
+++ /dev/null
@@ -1,25 +0,0 @@
-#===------------------------------------------------------------------------===#
-#
-#                     The KLEE Symbolic Virtual Machine
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-#===------------------------------------------------------------------------===#
-#
-# This file overrides the default compiler flags for CMake's built-in
-# configurations (CMAKE_BUILD_TYPE). Most compiler flags should not be set
-# here.  The main purpose is to make sure ``-DNDEBUG`` is never set by default.
-#
-#===------------------------------------------------------------------------===#
-
-if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"))
-  # Taken from Modules/Compiler/GNU.cmake but -DNDEBUG is removed
-  set(CMAKE_CXX_FLAGS_INIT "")
-  set(CMAKE_CXX_FLAGS_DEBUG_INIT "-O0 -g")
-  set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os")
-  set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3")
-  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
-else()
-  message(FATAL_ERROR "Overrides not set for compiler ${CMAKE_CXX_COMPILER_ID}")
-endif()