mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
bifcl: Adapted bifcl to compile with MSVC for Windows environment.
This commit is contained in:
parent
f69f9e06e1
commit
552be424c4
1 changed files with 9 additions and 1 deletions
|
@ -16,6 +16,11 @@ if ( MISSING_PREREQS )
|
|||
message(FATAL_ERROR "Configuration aborted due to missing prerequisites")
|
||||
endif ()
|
||||
|
||||
if (MSVC)
|
||||
set_property(SOURCE bif_lex.cc APPEND_STRING PROPERTY COMPILE_FLAGS "/wd4018")
|
||||
else()
|
||||
set_property(SOURCE bif_lex.cc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-sign-compare")
|
||||
endif()
|
||||
include(RequireCXX17)
|
||||
|
||||
include_directories(BEFORE
|
||||
|
@ -33,7 +38,6 @@ bison_target(BIFParser builtin-func.y
|
|||
COMPILE_FLAGS "${BISON_FLAGS}")
|
||||
flex_target(BIFScanner builtin-func.l ${BifCl_BINARY_DIR}/bif_lex.cc)
|
||||
add_flex_bison_dependency(BIFScanner BIFParser)
|
||||
set_property(SOURCE bif_lex.cc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-sign-compare")
|
||||
|
||||
set(bifcl_SRCS
|
||||
${BISON_BIFParser_INPUT}
|
||||
|
@ -48,6 +52,10 @@ set(bifcl_SRCS
|
|||
|
||||
add_executable(bifcl ${bifcl_SRCS})
|
||||
|
||||
if (MSVC)
|
||||
target_link_libraries(bifcl PRIVATE zeek_windows)
|
||||
endif()
|
||||
|
||||
install(TARGETS bifcl DESTINATION bin)
|
||||
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue