build: revised build scripts
This commit is contained in:
+8
-10
@@ -209,12 +209,12 @@ if (WIN32)
|
||||
set(TARGET "app")
|
||||
|
||||
file(GLOB MY_PUBLIC_HEADERS
|
||||
"${CMAKE_SOURCE_DIR}/setup/dynamic_libraries/win${BITS}/app/${CONFIGURATION}/*"
|
||||
"${CMAKE_SOURCE_DIR}/setup/dynamic_libraries/win${BITS}/app/${CONFIGURATION}/*"
|
||||
)
|
||||
file(COPY ${MY_PUBLIC_HEADERS} DESTINATION "${CMAKE_BINARY_DIR}/${CONFIGURATION}/${TARGET}/")
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
configure_file("${QT_BINARY_DIR}/Qt5Core${SUFFIX}.dll" "${CMAKE_BINARY_DIR}/${CONFIGURATION}/${TARGET}/Qt5Core${SUFFIX}.dll" COPYONLY)
|
||||
configure_file("${QT_BINARY_DIR}/Qt5Gui${SUFFIX}.dll" "${CMAKE_BINARY_DIR}/${CONFIGURATION}/${TARGET}/Qt5Gui${SUFFIX}.dll" COPYONLY)
|
||||
configure_file("${QT_BINARY_DIR}/Qt5Network${SUFFIX}.dll" "${CMAKE_BINARY_DIR}/${CONFIGURATION}/${TARGET}/Qt5Network${SUFFIX}.dll" COPYONLY)
|
||||
@@ -416,14 +416,12 @@ set_property(
|
||||
|
||||
target_link_libraries(${LIB_PYTHON_PROJECT_NAME} ${LIB_UTILITY_PROJECT_NAME} ${LIB_PROJECT_NAME})
|
||||
|
||||
if (WIN32)
|
||||
add_custom_command(
|
||||
TARGET ${LIB_PYTHON_PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/script/download_python_indexer.sh
|
||||
COMMENT "download python indexer"
|
||||
)
|
||||
endif ()
|
||||
add_custom_command(
|
||||
TARGET ${LIB_PYTHON_PROJECT_NAME}
|
||||
PRE_BUILD
|
||||
COMMAND ${PROJECT_SOURCE_DIR}/script/download_python_indexer.sh
|
||||
COMMENT "download python indexer"
|
||||
)
|
||||
|
||||
|
||||
# Lib Gui ----------------------------------------------------------------------
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
OUTPUT="csv.txt"
|
||||
touch $OUTPUT
|
||||
echo "NAME\tMAIL\tDATE" > $OUTPUT
|
||||
|
||||
for FILE in ./*.eml
|
||||
do
|
||||
TEST=$(grep -E -o "test license" $FILE)
|
||||
INVITE=$(grep -E -o "invited" $FILE)
|
||||
UPGRADE=$(grep -E -o "Upgrade" $FILE)
|
||||
|
||||
MAIL=$(grep -E -o "^To: [A-Za-z0-9._%+-]*@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}" $FILE | sed 's .\{4\} ')
|
||||
NAME=$(grep -E -o "<p>Hello .*,</p>" $FILE | sed 's .\{9\} ' | sed 's .\{5\}$ ' | sed 's/=/\\x/g')
|
||||
DATE=$(grep -E -o "Delivery-date: .*" $FILE | sed 's .\{20\} ' | sed 's .\{15\}$ ')
|
||||
|
||||
RECORD="$NAME\t$MAIL"
|
||||
|
||||
# if [[ ! -z "$INVITE" ]]
|
||||
# if [[ ! -z "$UPGRADE" ]]
|
||||
if [[ ! -z "$TEST" ]]
|
||||
then
|
||||
RECORD="$RECORD\t$DATE"
|
||||
|
||||
echo $RECORD
|
||||
echo $RECORD >> $OUTPUT
|
||||
fi
|
||||
done
|
||||
@@ -1,71 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ABORT="\033[31mAbort:\033[00m"
|
||||
SUCCESS="\033[32mSuccess:\033[00m"
|
||||
INFO="\033[33mInfo:\033[00m"
|
||||
|
||||
# Determine current platform
|
||||
PLATFORM='unknown'
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
PLATFORM='MacOS'
|
||||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
|
||||
PLATFORM='Linux'
|
||||
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
|
||||
PLATFORM='Windows'
|
||||
fi
|
||||
|
||||
if [ $PLATFORM == "Windows" ]; then
|
||||
ORIGINAL_PATH_TO_SCRIPT="${0}"
|
||||
CLEANED_PATH_TO_SCRIPT="${ORIGINAL_PATH_TO_SCRIPT//\\//}"
|
||||
ROOT_DIR=`dirname "$CLEANED_PATH_TO_SCRIPT"`
|
||||
else
|
||||
ROOT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
fi
|
||||
|
||||
ROOT_DIR=$ROOT_DIR/..
|
||||
|
||||
# Enter masterproject directory
|
||||
cd $ROOT_DIR
|
||||
|
||||
# git settings
|
||||
echo -e $INFO "install git settings"
|
||||
|
||||
git config commit.template setup/git/git_commit_template.txt
|
||||
git config color.ui true
|
||||
if [ -d ".git/hooks" ]; then
|
||||
cp setup/git/git_pre_commit_hook.sh .git/hooks/pre-commit
|
||||
cp setup/git/git_pre_push_hook.sh .git/hooks/pre-push
|
||||
fi
|
||||
|
||||
# Create Debug and Release folders
|
||||
echo -e $INFO "create build folders"
|
||||
if [ $PLATFORM == "Windows" ]; then
|
||||
else
|
||||
mkdir -p build/Debug/app
|
||||
mkdir -p build/Debug/test
|
||||
mkdir -p build/Release/app
|
||||
mkdir -p build/Release/test
|
||||
fi
|
||||
|
||||
if [ $PLATFORM == "Windows" ]; then
|
||||
else
|
||||
MY_PATH=`dirname "$0"`
|
||||
$MY_PATH/download_python_indexer.sh
|
||||
fi
|
||||
|
||||
|
||||
# Setup both Debug and Release configuration
|
||||
if [ $PLATFORM == "Linux" ] || [ $PLATFORM == "MacOS" ]; then
|
||||
mkdir -p build/Debug
|
||||
mkdir -p build/Release
|
||||
|
||||
echo -e $INFO "run cmake with Debug configuration"
|
||||
cd build/Debug && cmake -G Ninja -DCMAKE_BUILD_TYPE="Debug" ../..
|
||||
|
||||
echo -e $INFO "run cmake with Release configuration"
|
||||
cd ../Release && cmake -G Ninja -DCMAKE_BUILD_TYPE="Release" ../..
|
||||
fi
|
||||
|
||||
echo -e $SUCCESS "setup complete"
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# get absolute path to parent directory of script
|
||||
MY_PATH=`dirname "$0"`
|
||||
if [[ "${MY_PATH}" != *\\* ]]
|
||||
then
|
||||
cd $MY_PATH
|
||||
MY_PATH=`pwd`
|
||||
fi
|
||||
MY_PATH="${MY_PATH//\\//}"
|
||||
|
||||
cd ${MY_PATH}/..
|
||||
|
||||
git config commit.template setup/git/git_commit_template.txt
|
||||
git config color.ui true
|
||||
if [ -d ".git/hooks" ]; then
|
||||
cp setup/git/git_pre_commit_hook.sh .git/hooks/pre-commit
|
||||
cp setup/git/git_pre_push_hook.sh .git/hooks/pre-push
|
||||
fi
|
||||
@@ -29,7 +29,7 @@ cd $ROOT_DIR/
|
||||
|
||||
cd java_indexer
|
||||
|
||||
echo "cleaning and building java_indexer.jar"
|
||||
echo -e $INFO "cleaning and building java_indexer.jar"
|
||||
mvn clean package
|
||||
|
||||
cd ../
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Determine path to script
|
||||
MY_PATH=`dirname "$0"`
|
||||
|
||||
cd $MY_PATH/..
|
||||
|
||||
# Build and run target
|
||||
ninja -C build/Debug "$1" && cd bin && valgrind --tool=memcheck --leak-check=yes --log-file=../build/Debug/"$1".leaklog Debug/"$1"
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Determine path to script
|
||||
MY_PATH=`dirname "$0"`
|
||||
|
||||
cd $MY_PATH/..
|
||||
|
||||
# Build and run target
|
||||
ninja -C build/Release "$1" && cd bin && valgrind --tool=memcheck --leak-check=yes --log-file=../build/Release/"$1".leaklog Release/"$1"
|
||||
@@ -48,7 +48,6 @@ function build_type {
|
||||
else
|
||||
build Sourcetrail $1
|
||||
build Sourcetrail_test $1
|
||||
build Sourcetrail_license_generator $1
|
||||
run_tests $1
|
||||
fi
|
||||
}
|
||||
@@ -69,7 +68,7 @@ function run_tests {
|
||||
cd $ROOTDIR
|
||||
}
|
||||
|
||||
#testing before commiting to a publish branch
|
||||
# testing before commiting to a publish branch
|
||||
if [[ ${BRANCH_NAME:0:9} == "_publish_" ]]
|
||||
then
|
||||
echo Try to publish
|
||||
@@ -92,10 +91,4 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $BRANCH_NAME == "public_beta" ]
|
||||
then
|
||||
echo -e $ABORT "Commiting to public_beta is prohibited."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -6,14 +6,14 @@ FAIL="\033[31mFail:\033[00m"
|
||||
PASS="\033[32mPass:\033[00m"
|
||||
INFO="\033[33mInfo:\033[00m"
|
||||
|
||||
#handle delete remote branches
|
||||
# handle delete remote branches
|
||||
while read local_ref lorem_sha remote_ref remote_sha
|
||||
do
|
||||
if [ "$local_ref" == "(delete)" ]
|
||||
then
|
||||
if [ "$remote_ref" == "refs/heads/master" ]
|
||||
then
|
||||
echo -e $FAIL seriously dont delete the master
|
||||
echo -e $FAIL "seriously dont delete the master"
|
||||
exit 1
|
||||
else
|
||||
echo "delete remote branch $remote_ref"
|
||||
@@ -23,4 +23,3 @@ do
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -8167,7 +8167,7 @@ namespace Catch {
|
||||
{ SIGINT, "SIGINT - Terminal interrupt signal" },
|
||||
{ SIGILL, "SIGILL - Illegal instruction signal" },
|
||||
{ SIGFPE, "SIGFPE - Floating point error signal" },
|
||||
{ SIGSEGV, "SIGSEGV - Segmentation violation signal" },
|
||||
// { SIGSEGV, "SIGSEGV - Segmentation violation signal" },
|
||||
{ SIGTERM, "SIGTERM - Termination request signal" },
|
||||
{ SIGABRT, "SIGABRT - Abort (abnormal termination) signal" }
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ add_files(
|
||||
helper/TestIntermediateStorage.h
|
||||
|
||||
test_main.cpp
|
||||
|
||||
|
||||
CommandlineTestSuite.cpp
|
||||
ConfigManagerTestSuite.cpp
|
||||
CxxIncludeProcessingTestSuite.cpp
|
||||
|
||||
Reference in New Issue
Block a user