diff --git a/CHANGES b/CHANGES index 3ba2089357..e260100247 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,12 @@ +6.0.0-dev.617 | 2023-05-22 10:14:27 +0200 + + * Fix CMAKE_BUILD_TYPE_LOWER definition-vs-use ordering problem (Christian Kreibich, Corelight) + + It needs to be defined by the time we create zeek-config, which happens before + its current definition. To avoid a redundant TOLOWER when we check for presence + of --enable-debug at the beginning, this also switches this to a case-unadjusted + comparison to "Debug", which we use elsewhere in the file too. + 6.0.0-dev.614 | 2023-05-19 10:51:35 -0700 * Allow plugins to call find_package(Zeek) (Dominik Charousset) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c3fa86af0..e08d87d01c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,12 +11,8 @@ project(Zeek C CXX) # We want to set ENABLE_DEBUG to ON by default if the build type is Debug. set(ENABLE_DEBUG_DEFAULT OFF) -if (NOT GENERATOR_IS_MULTI_CONFIG) - string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type_lower) - if (build_type_lower STREQUAL "debug") - set(ENABLE_DEBUG_DEFAULT ON) - endif () - unset(build_type_lower) +if (NOT GENERATOR_IS_MULTI_CONFIG AND CMAKE_BUILD_TYPE STREQUAL "Debug") + set(ENABLE_DEBUG_DEFAULT ON) endif () # On UNIX, install additional Zeek tools by default and build shared objects. @@ -169,6 +165,8 @@ include(cmake/CommonCMakeConfig.cmake) include(cmake/FindClangTidy.cmake) include(cmake/CheckCompilerArch.cmake) +string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) + # ############################################################################## # Main targets and utilities. @@ -1262,7 +1260,6 @@ configure_file(${CMAKE_SOURCE_DIR}/spicy-path.in ${CMAKE_BINARY_DIR}/spicy-path configure_file(${CMAKE_SOURCE_DIR}/hilti-cxx-include-dirs.in ${CMAKE_BINARY_DIR}/hilti-cxx-include-dirs @ONLY) -string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeek-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-version.h) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zeek-version.h DESTINATION include/zeek) diff --git a/VERSION b/VERSION index 3012fedbe9..911c1bd9cb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.0-dev.614 +6.0.0-dev.617