mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/timw/cmake-find-package'
* origin/topic/timw/cmake-find-package: Change VERSION variable in CMake config to ZEEK_VERSION_FULL Update bifcl and binpac for FindPackage fixes Remove usage of FindRequiredPackage Update zeekctl and cmake to deprecate FindRequiredPackage Update broker submodule for pybind11 + cmake changes
This commit is contained in:
commit
bacc0dcae3
12 changed files with 39 additions and 44 deletions
14
CHANGES
14
CHANGES
|
@ -1,3 +1,17 @@
|
||||||
|
6.1.0-dev.272 | 2023-08-07 09:41:34 -0700
|
||||||
|
|
||||||
|
* Change VERSION variable in CMake config to ZEEK_VERSION_FULL (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* Update bifcl and binpac for FindPackage fixes (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* Remove usage of FindRequiredPackage (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* Update zeekctl and cmake to deprecate FindRequiredPackage (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* Update broker submodule for pybind11 + cmake changes (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* ci: Bump centos-7 (Arne Welzel, Corelight)
|
||||||
|
|
||||||
6.1.0-dev.264 | 2023-08-07 10:22:18 +0200
|
6.1.0-dev.264 | 2023-08-07 10:22:18 +0200
|
||||||
|
|
||||||
* Suppress new tsan findings from Ubuntu 22 upgrade (Tim Wojtulewicz)
|
* Suppress new tsan findings from Ubuntu 22 upgrade (Tim Wojtulewicz)
|
||||||
|
|
|
@ -531,7 +531,7 @@ file(
|
||||||
"setenv ZEEK_SPICY_LIBRARY_PATH \"${cmake_source_dir}/scripts/spicy\"\n"
|
"setenv ZEEK_SPICY_LIBRARY_PATH \"${cmake_source_dir}/scripts/spicy\"\n"
|
||||||
"setenv SPICY_BUILD_DIRECTORY \"${cmake_binary_dir}/auxil/spicy\"\n")
|
"setenv SPICY_BUILD_DIRECTORY \"${cmake_binary_dir}/auxil/spicy\"\n")
|
||||||
|
|
||||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" VERSION LIMIT_COUNT 1)
|
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" ZEEK_VERSION_FULL LIMIT_COUNT 1)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND grep "^constexpr int PLUGIN_API_VERSION"
|
COMMAND grep "^constexpr int PLUGIN_API_VERSION"
|
||||||
INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugin/Plugin.h
|
INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugin/Plugin.h
|
||||||
|
@ -541,7 +541,7 @@ execute_process(
|
||||||
string(REGEX MATCH "^constexpr int PLUGIN_API_VERSION = ([0-9]+);" API_VERSION "${API_VERSION}")
|
string(REGEX MATCH "^constexpr int PLUGIN_API_VERSION = ([0-9]+);" API_VERSION "${API_VERSION}")
|
||||||
set(API_VERSION "${CMAKE_MATCH_1}")
|
set(API_VERSION "${CMAKE_MATCH_1}")
|
||||||
|
|
||||||
string(REGEX REPLACE "[.-]" " " version_numbers ${VERSION})
|
string(REGEX REPLACE "[.-]" " " version_numbers ${ZEEK_VERSION_FULL})
|
||||||
separate_arguments(version_numbers)
|
separate_arguments(version_numbers)
|
||||||
list(GET version_numbers 0 VERSION_MAJOR)
|
list(GET version_numbers 0 VERSION_MAJOR)
|
||||||
list(GET version_numbers 1 VERSION_MINOR)
|
list(GET version_numbers 1 VERSION_MINOR)
|
||||||
|
@ -550,7 +550,7 @@ set(VERSION_MAJ_MIN "${VERSION_MAJOR}.${VERSION_MINOR}")
|
||||||
math(EXPR ZEEK_VERSION_NUMBER
|
math(EXPR ZEEK_VERSION_NUMBER
|
||||||
"${VERSION_MAJOR} * 10000 + ${VERSION_MINOR} * 100 + ${VERSION_PATCH}")
|
"${VERSION_MAJOR} * 10000 + ${VERSION_MINOR} * 100 + ${VERSION_PATCH}")
|
||||||
|
|
||||||
set(VERSION_C_IDENT "${VERSION}_plugin_${API_VERSION}")
|
set(VERSION_C_IDENT "${ZEEK_VERSION_FULL}_plugin_${API_VERSION}")
|
||||||
string(REGEX REPLACE "-[0-9]*$" "_git" VERSION_C_IDENT "${VERSION_C_IDENT}")
|
string(REGEX REPLACE "-[0-9]*$" "_git" VERSION_C_IDENT "${VERSION_C_IDENT}")
|
||||||
string(REGEX REPLACE "[^a-zA-Z0-9_\$]" "_" VERSION_C_IDENT "${VERSION_C_IDENT}")
|
string(REGEX REPLACE "[^a-zA-Z0-9_\$]" "_" VERSION_C_IDENT "${VERSION_C_IDENT}")
|
||||||
|
|
||||||
|
@ -721,8 +721,6 @@ endif ()
|
||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
# Dependency Configuration
|
# Dependency Configuration
|
||||||
|
|
||||||
include(FindRequiredPackage)
|
|
||||||
|
|
||||||
# Check cache value first to avoid displaying "Found sed" messages everytime
|
# Check cache value first to avoid displaying "Found sed" messages everytime
|
||||||
if (NOT SED_EXE)
|
if (NOT SED_EXE)
|
||||||
find_program(SED_EXE sed)
|
find_program(SED_EXE sed)
|
||||||
|
@ -734,15 +732,16 @@ if (NOT SED_EXE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
list(APPEND Python_ADDITIONAL_VERSIONS 3)
|
list(APPEND Python_ADDITIONAL_VERSIONS 3)
|
||||||
FindRequiredPackage(PythonInterp)
|
set(ZEEK_PYTHON_MIN 3.5.0)
|
||||||
FindRequiredPackage(FLEX)
|
find_package(Python ${ZEEK_PYTHON_MIN} REQUIRED COMPONENTS Interpreter)
|
||||||
FindRequiredPackage(BISON)
|
find_package(FLEX REQUIRED)
|
||||||
FindRequiredPackage(PCAP)
|
find_package(BISON 2.5 REQUIRED)
|
||||||
FindRequiredPackage(OpenSSL)
|
find_package(PCAP REQUIRED)
|
||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
FindRequiredPackage(BIND)
|
find_package(BIND REQUIRED)
|
||||||
endif ()
|
endif ()
|
||||||
FindRequiredPackage(ZLIB)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
if (NOT BINARY_PACKAGING_MODE)
|
if (NOT BINARY_PACKAGING_MODE)
|
||||||
# TODO: Broker seems to always turn on static libraries. We don't want that for Spicy by default.
|
# TODO: Broker seems to always turn on static libraries. We don't want that for Spicy by default.
|
||||||
|
@ -773,7 +772,7 @@ endif ()
|
||||||
if (ZEEK_PYTHON_DIR)
|
if (ZEEK_PYTHON_DIR)
|
||||||
set(py_mod_install_dir ${ZEEK_PYTHON_DIR})
|
set(py_mod_install_dir ${ZEEK_PYTHON_DIR})
|
||||||
elseif (ZEEK_PYTHON_PREFIX)
|
elseif (ZEEK_PYTHON_PREFIX)
|
||||||
set(pyver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
set(pyver ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR})
|
||||||
set(py_mod_install_dir ${ZEEK_PYTHON_PREFIX}/lib/python${pyver}/site-packages)
|
set(py_mod_install_dir ${ZEEK_PYTHON_PREFIX}/lib/python${pyver}/site-packages)
|
||||||
elseif (ZEEK_PYTHON_HOME)
|
elseif (ZEEK_PYTHON_HOME)
|
||||||
set(py_mod_install_dir ${ZEEK_PYTHON_HOME}/lib/python)
|
set(py_mod_install_dir ${ZEEK_PYTHON_HOME}/lib/python)
|
||||||
|
@ -801,7 +800,8 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/auxil/binpac/CMakeLists.txt)
|
||||||
# TODO in ZeekPluginConfig.cmake.in.
|
# TODO in ZeekPluginConfig.cmake.in.
|
||||||
set(BINPAC_EXE_PATH "${CMAKE_BINARY_DIR}/auxil/binpac/src/binpac${CMAKE_EXECUTABLE_SUFFIX}")
|
set(BINPAC_EXE_PATH "${CMAKE_BINARY_DIR}/auxil/binpac/src/binpac${CMAKE_EXECUTABLE_SUFFIX}")
|
||||||
endif ()
|
endif ()
|
||||||
FindRequiredPackage(BinPAC)
|
|
||||||
|
find_package(BinPAC REQUIRED)
|
||||||
|
|
||||||
# Add an alias (used by our plugin setup).
|
# Add an alias (used by our plugin setup).
|
||||||
add_executable(Zeek::BinPAC ALIAS binpac)
|
add_executable(Zeek::BinPAC ALIAS binpac)
|
||||||
|
@ -841,25 +841,6 @@ if (ENABLE_JEMALLOC)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (BISON_VERSION AND BISON_VERSION VERSION_LESS 2.5)
|
|
||||||
set(MISSING_PREREQS true)
|
|
||||||
list(APPEND MISSING_PREREQ_DESCS
|
|
||||||
" Could not find prerequisite package Bison >= 2.5, found: ${BISON_VERSION}")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (MISSING_PREREQS)
|
|
||||||
foreach (prereq ${MISSING_PREREQ_DESCS})
|
|
||||||
message(SEND_ERROR ${prereq})
|
|
||||||
endforeach ()
|
|
||||||
message(FATAL_ERROR "Configuration aborted due to missing prerequisites")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set(ZEEK_PYTHON_MIN 3.5.0)
|
|
||||||
|
|
||||||
if (PYTHON_VERSION_STRING VERSION_LESS ${ZEEK_PYTHON_MIN})
|
|
||||||
message(FATAL_ERROR "Python ${ZEEK_PYTHON_MIN} or greater is required.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
add_subdirectory(auxil/paraglob)
|
add_subdirectory(auxil/paraglob)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
cmake_policy(SET CMP0079 NEW)
|
cmake_policy(SET CMP0079 NEW)
|
||||||
|
@ -1307,7 +1288,7 @@ endif ()
|
||||||
# has already configured packaging
|
# has already configured packaging
|
||||||
if ("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
if ("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
||||||
include(ConfigurePackaging)
|
include(ConfigurePackaging)
|
||||||
ConfigurePackaging(${VERSION})
|
ConfigurePackaging(${ZEEK_VERSION_FULL})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Refers back to the "distribution prefix". This is the source tree when
|
# Refers back to the "distribution prefix". This is the source tree when
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
6.1.0-dev.264
|
6.1.0-dev.272
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit a4aadc5d644e9b13dd2ff76f3d1ed269c575ce90
|
Subproject commit c7bf54c587439d3bcb16d53b0d77a702e48d2526
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1e0a4a7e77ace47a73205973cb896ad5027f62af
|
Subproject commit 84b730fdcc5b983c65c6226ec092aee66c486680
|
|
@ -1 +1 @@
|
||||||
Subproject commit f338a5f6db54d0cf8db4708d6656b1856c8d59b4
|
Subproject commit 8dacaa358299a95e3c38fe479dbc348a69ed60a4
|
|
@ -1 +1 @@
|
||||||
Subproject commit 625b1698628efbf72629624e0352280de9784422
|
Subproject commit 81e8c48fea6171d49e66e371ae46437c7ee63a74
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
||||||
Subproject commit 50c5bf96c32038014f8517479c5ce3908c3b6100
|
Subproject commit 7a8069c2ee84a82119ce83033454e22942043570
|
|
@ -14,7 +14,7 @@ prefix="@CMAKE_INSTALL_PREFIX@"
|
||||||
python_dir="@PY_MOD_INSTALL_DIR@"
|
python_dir="@PY_MOD_INSTALL_DIR@"
|
||||||
script_dir="@ZEEK_SCRIPT_INSTALL_PATH@"
|
script_dir="@ZEEK_SCRIPT_INSTALL_PATH@"
|
||||||
site_dir="@ZEEK_SCRIPT_INSTALL_PATH@/site"
|
site_dir="@ZEEK_SCRIPT_INSTALL_PATH@/site"
|
||||||
version="@VERSION@"
|
version="@ZEEK_VERSION_FULL@"
|
||||||
zeek_dist="@ZEEK_DIST@"
|
zeek_dist="@ZEEK_DIST@"
|
||||||
zeekpath="@DEFAULT_ZEEKPATH@"
|
zeekpath="@DEFAULT_ZEEKPATH@"
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#define VERSION "@VERSION@"
|
#define VERSION "@ZEEK_VERSION_FULL@"
|
||||||
|
|
||||||
// Zeek version number.
|
// Zeek version number.
|
||||||
// This is the result of (major * 10000 + minor * 100 + patch)
|
// This is the result of (major * 10000 + minor * 100 + patch)
|
||||||
|
|
|
@ -256,7 +256,7 @@ cmake_policy(POP)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc
|
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py
|
COMMAND ${Python_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
|
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
|
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
#include "zeek/zeek-version.h"
|
#include "zeek/zeek-version.h"
|
||||||
|
|
||||||
char version[] = "@VERSION@";
|
char version[] = "@ZEEK_VERSION_FULL@";
|
||||||
|
|
||||||
// A C function that has the current version built into its name.
|
// A C function that has the current version built into its name.
|
||||||
// One can link a shared library against this to ensure that it won't
|
// One can link a shared library against this to ensure that it won't
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue