about summary refs log tree commit diff homepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2017-10-03 11:23:23 +0100
committerDan Liew <daniel.liew@imperial.ac.uk>2017-10-03 11:36:37 +0100
commit32f65623a0ef117b663fa6ae1a0a93d5f525ee75 (patch)
treef95895ad345d0259fdf5965b00727a1989e862a9 /CMakeLists.txt
parent91f5fffbb423f669603f29c323ec635d263f666a (diff)
downloadklee-32f65623a0ef117b663fa6ae1a0a93d5f525ee75.tar.gz
[CMake] Fix initialisation order of `KLEE_COMPONENT_*` and
`KLEE_SOLVER_LIBRARIES` variables. The code to add `NDEBUG` to
`KLEE_COMPONENT_CXX_DEFINES` did so before initialisation and would
be silently overwritten.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 12 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80e6b506..2d93de7a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -150,6 +150,18 @@ endif()
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
 
 ################################################################################
+# Compiler flags for KLEE components
+# Subsequent commands will append to these. These are used instead of
+# directly modifying CMAKE_CXX_FLAGS so that other code can be easily built with
+# different flags.
+################################################################################
+set(KLEE_COMPONENT_EXTRA_INCLUDE_DIRS "")
+set(KLEE_COMPONENT_CXX_DEFINES "")
+set(KLEE_COMPONENT_CXX_FLAGS "")
+set(KLEE_SOLVER_LIBRARIES "")
+set(KLEE_COMPONENT_EXTRA_LIBRARIES "")
+
+################################################################################
 # Assertions
 ################################################################################
 option(ENABLE_KLEE_ASSERTS "Enable KLEE assertions" ON)
@@ -178,17 +190,6 @@ include("${CMAKE_SOURCE_DIR}/cmake/string_to_list.cmake")
 include("${CMAKE_SOURCE_DIR}/cmake/klee_component_add_cxx_flag.cmake")
 include("${CMAKE_SOURCE_DIR}/cmake/add_global_flag.cmake")
 
-################################################################################
-# Compiler flags for KLEE components
-# Subsequent commands will append to these. These are used instead of
-# directly modifying CMAKE_CXX_FLAGS so that other code can be easily built with
-# different flags.
-################################################################################
-set(KLEE_COMPONENT_EXTRA_INCLUDE_DIRS "")
-set(KLEE_COMPONENT_CXX_DEFINES "")
-set(KLEE_COMPONENT_CXX_FLAGS "")
-set(KLEE_SOLVER_LIBRARIES "")
-set(KLEE_COMPONENT_EXTRA_LIBRARIES "")
 
 ################################################################################
 # Find LLVM