Include RequireCXXStd.cmake from main CMakeLists.txt

This commit is contained in:
Tim Wojtulewicz 2025-06-03 15:42:05 -07:00
parent 0de1d8a345
commit 350d0859aa

View file

@ -90,8 +90,6 @@ set(ZEEK_ETC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc"
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL
"Whether to write a JSON compile commands database") "Whether to write a JSON compile commands database")
set(ZEEK_CXX_STD cxx_std_17 CACHE STRING "The C++ standard to use.")
set(ZEEK_SANITIZERS "" CACHE STRING "Sanitizers to use when building.") set(ZEEK_SANITIZERS "" CACHE STRING "Sanitizers to use when building.")
set(CPACK_SOURCE_IGNORE_FILES "" CACHE STRING "Files to be ignored by CPack") set(CPACK_SOURCE_IGNORE_FILES "" CACHE STRING "Files to be ignored by CPack")
@ -209,6 +207,7 @@ endif ()
include(cmake/CommonCMakeConfig.cmake) include(cmake/CommonCMakeConfig.cmake)
include(cmake/CheckCompilerArch.cmake) include(cmake/CheckCompilerArch.cmake)
include(cmake/RequireCXXStd.cmake)
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
@ -237,7 +236,7 @@ set(ZEEK_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
# zeek-plugin-create-package.sh. Needed by ZeekPluginConfig.cmake.in. # zeek-plugin-create-package.sh. Needed by ZeekPluginConfig.cmake.in.
set(ZEEK_PLUGIN_SCRIPTS_PATH "${PROJECT_SOURCE_DIR}/cmake") set(ZEEK_PLUGIN_SCRIPTS_PATH "${PROJECT_SOURCE_DIR}/cmake")
# Our C++17 base target for propagating compiler and linker flags. Note: for # Our C++ base target for propagating compiler and linker flags. Note: for
# now, we only use it for passing library dependencies around. # now, we only use it for passing library dependencies around.
add_library(zeek_internal INTERFACE) add_library(zeek_internal INTERFACE)
add_library(Zeek::Internal ALIAS zeek_internal) add_library(Zeek::Internal ALIAS zeek_internal)
@ -356,7 +355,7 @@ endfunction ()
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
# Interface library for propagating extra flags and include paths to dynamically # Interface library for propagating extra flags and include paths to dynamically
# loaded plugins. Also propagates include paths and C++17 mode on the install # loaded plugins. Also propagates include paths and c++ standard mode on the install
# interface. # interface.
add_library(zeek_dynamic_plugin_base INTERFACE) add_library(zeek_dynamic_plugin_base INTERFACE)
target_include_directories( target_include_directories(