1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Changes to how source generating scripts are called from cmakelists

This commit is contained in:
Ben Thompson
2016-07-14 13:12:52 -05:00
parent 424628349b
commit 934920d73e
5 changed files with 25 additions and 64 deletions

View File

@ -2,7 +2,6 @@
include_directories( ${ENGINE_COMMON_INCLUDES} )
########### next target ###############
set(loggingcpp_LIB_SRCS
@ -16,42 +15,15 @@ set(loggingcpp_LIB_SRCS
add_library(loggingcpp SHARED ${loggingcpp_LIB_SRCS})
ADD_CUSTOM_COMMAND(TARGET loggingcpp PRE_BUILD
COMMAND ./genMsgAndErrId.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS genMsgId.pl genErrId.pl
)
set_target_properties(loggingcpp PROPERTIES VERSION 1.0.0 SOVERSION 1)
install(TARGETS loggingcpp DESTINATION ${ENGINE_LIBDIR})
install(FILES MessageFile.txt ErrorMessage.txt DESTINATION ${ENGINE_ETCDIR})
#
#
# TODO BEN FIX ME
#
#
execute_process(
COMMAND ./genMsgId.pl > messageids-temp.h
COMMAND diff -abBq messageids-temp.h messageids.h >/dev/null 2>&1;
if [ $$? -ne 0 ]; then
mv -f messageids-temp.h messageids.h;
else
touch messageids.h;
fi;
rm -f messageids-temp.h
)
execute_process(
COMMAND ./genErrId.pl > errorids-temp.h
COMMAND diff -abBq errorids-temp.h errorids.h >/dev/null 2>&1;
if [ $$? -ne 0 ]; then
mv -f errorids-temp.h errorids.h;
else
touch errorids.h;
fi;
rm -f errorids-temp.h
)
########### install files ###############
#install(FILES loggingid.h messageobj.h messagelog.h messageids.h logger.h errorcodes.h exceptclasses.h sqllogger.h stopwatch.h idberrorinfo.h errorids.h DESTINATION include)
#install(FILES MessageFile.txt ErrorMessage.txt DESTINATION )