mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
gen-zam: Remove submodule, adapt CMake configuration for Zeek build
This commit is contained in:
parent
526238299d
commit
a2f4f2adc3
6 changed files with 6 additions and 41 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -40,9 +40,6 @@
|
||||||
[submodule "auxil/zeek-client"]
|
[submodule "auxil/zeek-client"]
|
||||||
path = auxil/zeek-client
|
path = auxil/zeek-client
|
||||||
url = https://github.com/zeek/zeek-client
|
url = https://github.com/zeek/zeek-client
|
||||||
[submodule "auxil/gen-zam"]
|
|
||||||
path = auxil/gen-zam
|
|
||||||
url = https://github.com/zeek/gen-zam
|
|
||||||
[submodule "auxil/c-ares"]
|
[submodule "auxil/c-ares"]
|
||||||
path = auxil/c-ares
|
path = auxil/c-ares
|
||||||
url = https://github.com/c-ares/c-ares
|
url = https://github.com/c-ares/c-ares
|
||||||
|
|
|
@ -912,7 +912,7 @@ set(BIFCL_EXE_PATH "${CMAKE_BINARY_DIR}/tools/bifcl/bifcl${CMAKE_EXECUTABLE_SUFF
|
||||||
set(_bifcl_exe_path "included")
|
set(_bifcl_exe_path "included")
|
||||||
|
|
||||||
if (NOT GEN_ZAM_EXE_PATH)
|
if (NOT GEN_ZAM_EXE_PATH)
|
||||||
add_subdirectory(auxil/gen-zam)
|
add_subdirectory(tools/gen-zam)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (ENABLE_JEMALLOC)
|
if (ENABLE_JEMALLOC)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 56a6db00b887c79d26f303676677cb490d1c296d
|
|
|
@ -1,33 +1,2 @@
|
||||||
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
|
add_executable(gen-zam)
|
||||||
project(Gen-ZAM C CXX)
|
target_sources(gen-zam PRIVATE src/Gen-ZAM.cc)
|
||||||
|
|
||||||
include(cmake/CommonCMakeConfig.cmake)
|
|
||||||
|
|
||||||
include(RequireCXXStd)
|
|
||||||
|
|
||||||
set(GEN_ZAM_SRCS src/Gen-ZAM.cc)
|
|
||||||
set(GEN_ZAM_HEADERS src/Gen-ZAM.h)
|
|
||||||
add_executable(gen-zam ${GEN_ZAM_SRCS} ${GEN_ZAM_HEADERS})
|
|
||||||
install(TARGETS gen-zam DESTINATION bin)
|
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE)
|
|
||||||
string(TOUPPER ${CMAKE_BUILD_TYPE} BuildType)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
message(
|
|
||||||
"\n===================| Gen-ZAM Build Summary |==================\n"
|
|
||||||
"\n"
|
|
||||||
"\nBuild type: ${CMAKE_BUILD_TYPE}"
|
|
||||||
"\nBuild dir: ${PROJECT_BINARY_DIR}"
|
|
||||||
"\nInstall prefix: ${CMAKE_INSTALL_PREFIX}"
|
|
||||||
"\nDebug mode: ${ENABLE_DEBUG}"
|
|
||||||
"\n"
|
|
||||||
"\nCC: ${CMAKE_C_COMPILER}"
|
|
||||||
"\nCFLAGS: ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BuildType}}"
|
|
||||||
"\nCXX: ${CMAKE_CXX_COMPILER}"
|
|
||||||
"\nCXXFLAGS: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BuildType}}"
|
|
||||||
"\nCPP: ${CMAKE_CXX_COMPILER}"
|
|
||||||
"\n"
|
|
||||||
"\n================================================================\n")
|
|
||||||
|
|
||||||
include(UserChangedWarning)
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ ArgsManager::ArgsManager(const OCVec& oc_orig, ZAM_InstClass zc) {
|
||||||
|
|
||||||
void ArgsManager::Differentiate() {
|
void ArgsManager::Differentiate() {
|
||||||
// First, figure out which parameter names are used how often.
|
// First, figure out which parameter names are used how often.
|
||||||
map<string, int> name_count; // how often the name apepars
|
map<string, int> name_count; // how often the name appears
|
||||||
map<string, int> usage_count; // how often the name's been used so far
|
map<string, int> usage_count; // how often the name's been used so far
|
||||||
for ( auto& arg : args ) {
|
for ( auto& arg : args ) {
|
||||||
auto& name = arg.param_name;
|
auto& name = arg.param_name;
|
||||||
|
|
|
@ -367,7 +367,7 @@ protected:
|
||||||
|
|
||||||
// An "assignment-less" operation is one that, if its result
|
// An "assignment-less" operation is one that, if its result
|
||||||
// is used in a dead assignment, should be converted to a different
|
// is used in a dead assignment, should be converted to a different
|
||||||
// operation that explictly omits any assignment.
|
// operation that explicitly omits any assignment.
|
||||||
bool HasAssignmentLess() const { return ! assignment_less_op.empty(); }
|
bool HasAssignmentLess() const { return ! assignment_less_op.empty(); }
|
||||||
void SetAssignmentLess(string op, string op_class) {
|
void SetAssignmentLess(string op, string op_class) {
|
||||||
assignment_less_op = std::move(op);
|
assignment_less_op = std::move(op);
|
||||||
|
@ -515,7 +515,7 @@ protected:
|
||||||
IndentDown();
|
IndentDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start/finish emiting a (likely multi-line) string literal -
|
// Start/finish emitting a (likely multi-line) string literal -
|
||||||
// see corresponding ZAMGen methods.
|
// see corresponding ZAMGen methods.
|
||||||
void StartString();
|
void StartString();
|
||||||
void EndString();
|
void EndString();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue