mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
gen-zam: Establish the usual environment for cmake-driven builds
This commit is contained in:
parent
c1f240295f
commit
5ea34f20b8
2 changed files with 42 additions and 0 deletions
36
tools/gen-zam/CMakeLists.txt
Normal file
36
tools/gen-zam/CMakeLists.txt
Normal file
|
@ -0,0 +1,36 @@
|
|||
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||
project(Gen-ZAM C CXX)
|
||||
|
||||
include(cmake/CommonCMakeConfig.cmake)
|
||||
|
||||
include(FindRequiredPackage)
|
||||
|
||||
include(RequireCXX17)
|
||||
|
||||
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)
|
Loading…
Add table
Add a link
Reference in a new issue