1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Add CMake build tree files

This commit is contained in:
Ben Thompson
2016-07-13 18:12:37 -05:00
parent 3bee340d5f
commit 424628349b
116 changed files with 4183 additions and 155 deletions

View File

@ -0,0 +1,52 @@
include_directories( ${ENGINE_COMMON_INCLUDES} )
ADD_CUSTOM_COMMAND(
OUTPUT dml-gram.cpp dml-gram-temp.cpp
COMMAND ./dml-gram.sh ${BISON_EXECUTABLE}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS dml.y
)
ADD_CUSTOM_TARGET(
dmlgramSRC ALL DEPENDS dml-gram-temp.cpp
)
ADD_CUSTOM_COMMAND(
OUTPUT dml-scan.cpp dml-scan-temp.cpp
COMMAND ./dml-scan.sh ${LEX_EXECUTABLE}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS dml.l
)
ADD_CUSTOM_TARGET(
dmlscanSRC ALL DEPENDS dml-scan-temp.cpp
)
########### next target ###############
set(dmlpackage_LIB_SRCS
dml-scan.cpp
dml-gram.cpp
calpontdmlfactory.cpp
calpontdmlpackage.cpp
dmlcolumn.cpp
deletedmlpackage.cpp
dmlobject.cpp
insertdmlpackage.cpp
mysqldmlstatement.cpp
oracledmlstatement.cpp
row.cpp
dmltable.cpp
updatedmlpackage.cpp
vendordmlstatement.cpp
commanddmlpackage.cpp
dmlpkg.cpp
dmlparser.cpp)
add_library(dmlpackage SHARED ${dmlpackage_LIB_SRCS})
add_dependencies(dmlpackage dmlgramSRC dmlscanSRC)
set_target_properties(dmlpackage PROPERTIES VERSION 1.0.0 SOVERSION 1)
install(TARGETS dmlpackage DESTINATION ${ENGINE_LIBDIR})

23
dbcon/dmlpackage/dml-gram.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
#dml-gram.cpp: dml.y
$1 -l -v -d -p dml -o dml-gram-temp.cpp dml.y
set +e; \
if [ -f dml-gram.cpp ]; \
then diff -abBq dml-gram-temp.cpp dml-gram.cpp >/dev/null 2>&1; \
if [ $? -ne 0 ]; \
then mv -f dml-gram-temp.cpp dml-gram.cpp; \
else touch dml-gram.cpp; \
fi; \
else mv -f dml-gram-temp.cpp dml-gram.cpp; \
fi
set +e; \
if [ -f dml-gram.h ]; \
then diff -abBq dml-gram-temp.hpp dml-gram.h >/dev/null 2>&1; \
if [ $? -ne 0 ]; \
then mv -f dml-gram-temp.hpp dml-gram.h; \
else touch dml-gram.h; \
fi; \
else mv -f dml-gram-temp.hpp dml-gram.h; \
fi
rm -f dml-gram-temp.cpp dml-gram-temp.hpp dml-gram-temp.output

14
dbcon/dmlpackage/dml-scan.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
#dml-scan.cpp: dml.l
$1 -i -L -Pdml -odml-scan-temp.cpp dml.l
set +e; \
if [ -f dml-scan.cpp ]; \
then diff -abBq dml-scan-temp.cpp dml-scan.cpp >/dev/null 2>&1; \
if [ $$? -ne 0 ]; \
then mv -f dml-scan-temp.cpp dml-scan.cpp; \
else touch dml-scan.cpp; \
fi; \
else mv -f dml-scan-temp.cpp dml-scan.cpp; \
fi
rm -f dml-scan-temp.cpp