-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebased to current `main`.
- Loading branch information
Showing
573 changed files
with
49,383 additions
and
34,685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,19 @@ | ||
# Copyright (c) 2020-2023 by the Zeek Project. See LICENSE for details. | ||
|
||
# TODO: Clean this up. Turn into functions with named parameters. | ||
### Autogenerate glue code for a set of operator definitions. | ||
macro (autogen_operators outputs ns srcdir autogen_h autogen_cc) | ||
set(_outputs "${autogen_h}/ast-visitor-dispatcher.h" "${autogen_h}/ast-forward.h" | ||
"${autogen_cc}/ast-visitor-dispatcher.cc") | ||
|
||
### Autogenerate *.decl file for a set of operator definitions. | ||
macro (autogen_operators outputs ns srcdir dst_decls dst_impls) | ||
set(_output_decls "${dst_decls}") | ||
set(_output_impls "${dst_impls}") | ||
|
||
file(GLOB _headers ${CMAKE_CURRENT_SOURCE_DIR}/${srcdir}/*.h) | ||
|
||
add_custom_command( | ||
OUTPUT ${_output_decls} | ||
COMMAND ${PROJECT_SOURCE_DIR}/scripts/autogen-operators-nodes-decl ${ns} | ||
${CMAKE_CURRENT_SOURCE_DIR}/${srcdir} >${_output_decls} | ||
DEPENDS ${PROJECT_SOURCE_DIR}/scripts/autogen-operators-nodes-decl ${_headers} | ||
COMMENT "Generating ${_output_decls}") | ||
|
||
set_source_files_properties(${_output_decls} PROPERTIES GENERATED TRUE) | ||
|
||
## | ||
file(GLOB _operators ${CMAKE_CURRENT_SOURCE_DIR}/${srcdir}/*.cc) | ||
|
||
add_custom_command( | ||
OUTPUT "${AUTOGEN_CC}/operators-implementations.cc" | ||
COMMAND ${PROJECT_SOURCE_DIR}/scripts/autogen-operators-implementations ${ns} | ||
${CMAKE_CURRENT_SOURCE_DIR}/${srcdir} >${_output_impls} | ||
DEPENDS ${PROJECT_SOURCE_DIR}/scripts/autogen-operators-implementations ${_headers} | ||
COMMENT "Generating ${AUTOGEN_CC}/operators-implementations.cc") | ||
|
||
set_source_files_properties(${_output_impls} PROPERTIES GENERATED TRUE) | ||
list(APPEND ${outputs} ${_output_impls}) | ||
OUTPUT ${_outputs} | ||
COMMAND ${PROJECT_SOURCE_DIR}/scripts/autogen-operators ${ns} ${autogen_h} ${autogen_cc} -- | ||
${_operators} | ||
DEPENDS ${PROJECT_SOURCE_DIR}/scripts/autogen-operators ${_operators} | ||
COMMENT "Generating operator glue code ...") | ||
|
||
set_source_files_properties(${outputs} PROPERTIES GENERATED TRUE) | ||
set(${outputs} ${_outputs}) | ||
endmacro () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
#pragma once | ||
|
||
#include <optional> | ||
#include <string> | ||
#include <utility> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.