1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-23 07:05:36 +03:00
Sergei Golubchik dee50318ad
Serg dev (#2502)
* build boost during build phase, not during configure

* add dependency for generated header files errorids.h messageids.h

see 7e868bc58833

* set explicit dependencies on external_boost for #include's

* clang-14 compatibility fix
2022-08-13 07:18:30 +03:00

38 lines
1.4 KiB
CMake

include_directories( ${ENGINE_COMMON_INCLUDES} )
########### next target ###############
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/messageids.h
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/genMsgId.pl < ${CMAKE_CURRENT_SOURCE_DIR}/MessageFile.txt > messageids-temp.h
COMMAND ${CMAKE_COMMAND} -E copy_if_different messageids-temp.h messageids.h
DEPENDS genMsgId.pl
)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/errorids.h
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/genErrId.pl < ${CMAKE_CURRENT_SOURCE_DIR}/ErrorMessage.txt > errorids-temp.h
COMMAND ${CMAKE_COMMAND} -E copy_if_different errorids-temp.h errorids.h
DEPENDS genErrId.pl
)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/messageids.h PROPERTIES GENERATED TRUE)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/errorids.h PROPERTIES GENERATED TRUE)
add_library(loggingcpp SHARED
message.cpp
messagelog.cpp
logger.cpp
errorcodes.cpp
sqllogger.cpp
stopwatch.cpp
idberrorinfo.cpp
${CMAKE_CURRENT_BINARY_DIR}/messageids.h
${CMAKE_CURRENT_BINARY_DIR}/errorids.h
)
add_dependencies(loggingcpp external_boost)
install(TARGETS loggingcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine)
install(FILES MessageFile.txt ErrorMessage.txt DESTINATION ${ENGINE_SYSCONFDIR}/columnstore COMPONENT columnstore-engine)