mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Merge remote-tracking branch 'origin/topic/awelzel/3139-zeek-version-spicy-ccache-busting'
* origin/topic/awelzel/3139-zeek-version-spicy-ccache-busting: spicy: Remove Zeek version from spicyz/config.h.in
This commit is contained in:
commit
0dfee33c83
7 changed files with 42 additions and 8 deletions
14
CHANGES
14
CHANGES
|
@ -1,3 +1,17 @@
|
|||
7.0.0-dev.13 | 2024-02-22 17:00:29 +0100
|
||||
|
||||
* GH-3139: spicy: Remove Zeek version from spicyz/config.h.in (Arne Welzel, Corelight)
|
||||
|
||||
It seems that Zeek's version number and string only need to be
|
||||
available at runtime, so this change removes it from spicyz/configh.in
|
||||
to avoid needlessly busting ccache for the src/spicyz tree for on a
|
||||
Zeek version bump.
|
||||
|
||||
* spicy: Drop ZEEK_VERSION_NUMBER ifdef'ery (Arne Welzel, Corelight)
|
||||
|
||||
Given src/spicy is part of the Zeek tree, these are not necessary and
|
||||
are probably just remains from the spicy-plugin era.
|
||||
|
||||
7.0.0-dev.10 | 2024-02-22 12:38:38 +0100
|
||||
|
||||
* signatures: Fix ISO 9960 signature (Arne Welzel, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
7.0.0-dev.10
|
||||
7.0.0-dev.13
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
configure_file(config.h.in config.h)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/zeek/spicy/spicyz)
|
||||
|
||||
add_executable(spicyz driver.cc glue-compiler.cc main.cc)
|
||||
add_executable(spicyz driver.cc glue-compiler.cc main.cc zeek-version.cc)
|
||||
target_compile_options(spicyz PRIVATE "-Wall")
|
||||
target_compile_features(spicyz PRIVATE "${ZEEK_CXX_STD}")
|
||||
set_target_properties(spicyz PROPERTIES CXX_EXTENSIONS OFF)
|
||||
|
|
|
@ -58,10 +58,7 @@ inline const auto CxxZeekIncludesDirectories() {
|
|||
|
||||
// Version of Spicy that we are compiling against.
|
||||
#cmakedefine SPICY_VERSION_NUMBER ${SPICY_VERSION_NUMBER}
|
||||
#cmakedefine ZEEK_VERSION_NUMBER ${ZEEK_VERSION_NUMBER}
|
||||
|
||||
inline const auto SpicyVersion = "${SPICY_VERSION_LONG}";
|
||||
inline const auto ZeekVersion = "${ZEEK_VERSION_FULL}";
|
||||
inline const auto InstallPrefix = path("${CMAKE_INSTALL_PREFIX}");
|
||||
|
||||
} // namespace zeek::spicy::configuration
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "config.h"
|
||||
#include "driver.h"
|
||||
#include "glue-compiler.h"
|
||||
#include "zeek-version.h"
|
||||
|
||||
using namespace zeek::spicy;
|
||||
|
||||
|
@ -194,9 +195,9 @@ static hilti::Result<Nothing> parseOptions(int argc, char** argv, hilti::driver:
|
|||
compiler_options->keep_tmps = true;
|
||||
break;
|
||||
|
||||
case 'v': std::cout << configuration::ZeekVersion << std::endl; return Nothing();
|
||||
case 'v': std::cout << configuration::ZeekVersionString() << std::endl; return Nothing();
|
||||
|
||||
case 'V': std::cout << ZEEK_VERSION_NUMBER << std::endl; return Nothing();
|
||||
case 'V': std::cout << configuration::ZeekVersionNumber() << std::endl; return Nothing();
|
||||
|
||||
case 'z': {
|
||||
if ( auto zcfg = getenv("ZEEK_CONFIG"); zcfg && *zcfg )
|
||||
|
@ -245,7 +246,8 @@ static hilti::Result<Nothing> parseOptions(int argc, char** argv, hilti::driver:
|
|||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
Driver driver(std::make_unique<GlueCompiler>(), "", configuration::LibraryPath(), ZEEK_VERSION_NUMBER);
|
||||
Driver driver(std::make_unique<GlueCompiler>(), "", configuration::LibraryPath(),
|
||||
configuration::ZeekVersionNumber());
|
||||
|
||||
hilti::driver::Options driver_options;
|
||||
driver_options.execute_code = true;
|
||||
|
|
11
src/spicy/spicyz/zeek-version.cc
Normal file
11
src/spicy/spicyz/zeek-version.cc
Normal file
|
@ -0,0 +1,11 @@
|
|||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
|
||||
#include "zeek-version.h"
|
||||
|
||||
#include "zeek/zeek-version.h"
|
||||
|
||||
using namespace zeek::spicy;
|
||||
|
||||
int configuration::ZeekVersionNumber() { return ZEEK_VERSION_NUMBER; }
|
||||
|
||||
const char* configuration::ZeekVersionString() { return VERSION; }
|
10
src/spicy/spicyz/zeek-version.h
Normal file
10
src/spicy/spicyz/zeek-version.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace zeek::spicy::configuration {
|
||||
|
||||
int ZeekVersionNumber();
|
||||
const char* ZeekVersionString();
|
||||
|
||||
} // namespace zeek::spicy::configuration
|
Loading…
Add table
Add a link
Reference in a new issue