mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
binpac: Force -std=c++17 mode for cmake targets, remove use of RequireCXX17.cmake
This commit is contained in:
parent
b7cc5afa78
commit
874de5d25b
2 changed files with 8 additions and 2 deletions
|
@ -27,7 +27,9 @@ set(binpac_lib_SRCS
|
|||
|
||||
if ( ENABLE_SHARED )
|
||||
add_library(binpac_lib SHARED ${binpac_lib_SRCS})
|
||||
target_compile_features(binpac_lib PRIVATE cxx_std_17)
|
||||
set_target_properties(binpac_lib PROPERTIES
|
||||
CXX_EXTENSIONS OFF
|
||||
SOVERSION ${BINPAC_SOVERSION}
|
||||
VERSION ${BINPAC_VERSION_MAJOR}.${BINPAC_VERSION_MINOR}
|
||||
MACOSX_RPATH true
|
||||
|
@ -37,7 +39,10 @@ endif ()
|
|||
|
||||
if ( ENABLE_STATIC )
|
||||
add_library(binpac_static STATIC ${binpac_lib_SRCS})
|
||||
set_target_properties(binpac_static PROPERTIES OUTPUT_NAME binpac)
|
||||
target_compile_features(binpac_static PRIVATE cxx_std_17)
|
||||
set_target_properties(binpac_static PROPERTIES
|
||||
CXX_EXTENSIONS OFF
|
||||
OUTPUT_NAME binpac)
|
||||
install(TARGETS binpac_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ if (MSVC)
|
|||
else()
|
||||
set_property(SOURCE pac_scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-sign-compare")
|
||||
endif()
|
||||
include(RequireCXX17)
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src
|
||||
${PROJECT_BINARY_DIR}/src)
|
||||
|
@ -103,6 +102,8 @@ set(binpac_SRCS
|
|||
)
|
||||
|
||||
add_executable(binpac ${binpac_SRCS})
|
||||
target_compile_features(binpac PRIVATE cxx_std_17)
|
||||
set_target_properties(binpac PROPERTIES CXX_EXTENSIONS OFF)
|
||||
|
||||
if ( MSVC )
|
||||
# If building separately from zeek, we need to add the libunistd subdirectory so
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue