You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-3941 Ninja now builds MCS.
Generated files in utils/loggingcpp/ are now moved into bin dir.
This commit is contained in:
@ -1,17 +1,22 @@
|
||||
|
||||
include_directories( ${ENGINE_COMMON_INCLUDES} )
|
||||
|
||||
|
||||
########### next target ###############
|
||||
#TODO: put generated files in binary dir
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/messageids.h ${CMAKE_CURRENT_SOURCE_DIR}/errorids.h
|
||||
COMMAND /bin/sh genMsgAndErrId.sh
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS genMsgId.pl genErrId.pl
|
||||
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}/errorids.h PROPERTIES GENERATED TRUE)
|
||||
|
||||
add_library(loggingcpp SHARED
|
||||
message.cpp
|
||||
messagelog.cpp
|
||||
@ -20,11 +25,9 @@ add_library(loggingcpp SHARED
|
||||
sqllogger.cpp
|
||||
stopwatch.cpp
|
||||
idberrorinfo.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/messageids.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/errorids.h
|
||||
)
|
||||
|
||||
|
||||
${CMAKE_CURRENT_BINARY_DIR}/messageids.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/errorids.h
|
||||
)
|
||||
|
||||
install(TARGETS loggingcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs)
|
||||
|
||||
|
@ -3,8 +3,6 @@
|
||||
# $Id: genErrId.pl 3048 2012-04-04 15:33:45Z rdempsey $
|
||||
#
|
||||
|
||||
open FH, "< ./ErrorMessage.txt" or die;
|
||||
|
||||
$frontmatter = <<'EOD';
|
||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||
|
||||
@ -46,7 +44,7 @@ EOD
|
||||
|
||||
print $frontmatter;
|
||||
|
||||
while (<FH>)
|
||||
while (<>)
|
||||
{
|
||||
chomp;
|
||||
next if (/^$/);
|
||||
@ -56,6 +54,3 @@ while (<FH>)
|
||||
}
|
||||
|
||||
print $backmatter;
|
||||
|
||||
close FH;
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
perl ./genMsgId.pl > messageids-temp.h
|
||||
diff -abBq messageids-temp.h messageids.h >/dev/null 2>&1; if [ $? -ne 0 ]; then mv -f messageids-temp.h messageids.h; else touch -a messageids.h; fi;
|
||||
rm -f messageids-temp.h
|
||||
perl ./genErrId.pl > errorids-temp.h
|
||||
diff -abBq errorids-temp.h errorids.h >/dev/null 2>&1; if [ $? -ne 0 ]; then mv -f errorids-temp.h errorids.h; else touch -a errorids.h; fi;
|
||||
rm -f errorids-temp.h
|
@ -3,8 +3,6 @@
|
||||
# $Id: genMsgId.pl 3048 2012-04-04 15:33:45Z rdempsey $
|
||||
#
|
||||
|
||||
open FH, "< ./MessageFile.txt" or die;
|
||||
|
||||
$frontmatter = <<'EOD';
|
||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||
|
||||
@ -46,7 +44,7 @@ EOD
|
||||
|
||||
print $frontmatter;
|
||||
|
||||
while (<FH>)
|
||||
while (<>)
|
||||
{
|
||||
chomp;
|
||||
next if (/^$/);
|
||||
@ -56,6 +54,3 @@ while (<FH>)
|
||||
}
|
||||
|
||||
print $backmatter;
|
||||
|
||||
close FH;
|
||||
|
||||
|
Reference in New Issue
Block a user