From 32f65623a0ef117b663fa6ae1a0a93d5f525ee75 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Tue, 3 Oct 2017 11:23:23 +0100 Subject: [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. --- CMakeLists.txt | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80e6b506..2d93de7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,6 +149,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 ################################################################################ @@ -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 -- cgit 1.4.1 From b24c543a35512c5a4c8bc6ed18fe3105f0ce4964 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Tue, 3 Oct 2017 11:51:02 +0100 Subject: [CMake] Report the value of some important variables during configure to aid debugging. --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d93de7a..c61c2431 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -621,6 +621,15 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +################################################################################ +# Report the value of various variables to aid debugging +################################################################################ +message(STATUS "KLEE_COMPONENT_EXTRA_INCLUDE_DIRS: '${KLEE_COMPONENT_EXTRA_INCLUDE_DIRS}'") +message(STATUS "KLEE_COMPONENT_CXX_DEFINES: '${KLEE_COMPONENT_CXX_DEFINES}'") +message(STATUS "KLEE_COMPONENT_CXX_FLAGS: '${KLEE_COMPONENT_CXX_FLAGS}'") +message(STATUS "KLEE_COMPONENT_EXTRA_LIBRARIES: '${KLEE_COMPONENT_EXTRA_LIBRARIES}'") + ################################################################################ # KLEE components ################################################################################ -- cgit 1.4.1