Skip to content

Commit

Permalink
fixed scripts and compilation errors in linux and CMake config issues…
Browse files Browse the repository at this point in the history
… as well
  • Loading branch information
faburaya committed Nov 26, 2017
1 parent 62d4a18 commit 694a4b4
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 22 deletions.
2 changes: 1 addition & 1 deletion 3FD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ add_library(3FD STATIC

install(
TARGETS 3FD
DESTINATION "${PROJECT_SOURCE_DIR}/../build/bin"
DESTINATION "${PROJECT_SOURCE_DIR}/../build/lib"
)
14 changes: 8 additions & 6 deletions 3FD/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
#include "logger.h"
#include "gc.h"

#ifdef _USING_V110_SDK71_
# include <ObjBase.h>
#else
# include <roapi.h>
#ifdef _WIN32
# ifdef _USING_V110_SDK71_
# include <ObjBase.h>
# else
# include <roapi.h>
# endif
#endif

#ifdef _3FD_PLATFORM_WINRT
# include "sqlite3.h"
# include "sqlite3.h"
#endif

#include <codecvt>
Expand Down Expand Up @@ -208,4 +210,4 @@ namespace core
}

}// end of namespace core
}// end of namespace _3fd
}// end of namespace _3fd
1 change: 1 addition & 0 deletions 3FD/sqlite_prepstatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "exceptions.h"
#include <cassert>
#include <codecvt>
#include <locale>
#include <sstream>
#include <algorithm>

Expand Down
1 change: 1 addition & 0 deletions 3FD/utils_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <algorithm>
#include <cinttypes>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <string>
#include <array>
Expand Down
1 change: 1 addition & 0 deletions 3FD/utils_memorypool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "exceptions.h"

#include <sstream>
#include <cstring>
#include <cassert>

namespace _3fd
Expand Down
4 changes: 2 additions & 2 deletions IntegrationTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ endif()
# Place the configuration file along with the executable:
add_custom_command(
OUTPUT IntegrationTests.3fd.config
COMMAND cp ${PROJECT_SOURCE_DIR}/application.config ${CMAKE_CURRENT_BINARY_DIR}/IntegrationTests.3fd.config
COMMAND cp ${PROJECT_SOURCE_DIR}/application.config ${PROJECT_SOURCE_DIR}/../build/bin/IntegrationTests.3fd.config
DEPENDS ${PROJECT_SOURCE_DIR}/application.config
)

Expand Down Expand Up @@ -99,4 +99,4 @@ target_link_libraries(IntegrationTests
install(
TARGETS IntegrationTests
DESTINATION "${PROJECT_SOURCE_DIR}/../build/bin"
)
)
4 changes: 2 additions & 2 deletions UnitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ endif()
# Place the configuration file along with the executable:
add_custom_command(
OUTPUT UnitTests.3fd.config
COMMAND cp ${PROJECT_SOURCE_DIR}/application.config ${CMAKE_CURRENT_BINARY_DIR}/UnitTests.3fd.config
COMMAND cp ${PROJECT_SOURCE_DIR}/application.config ${PROJECT_SOURCE_DIR}/../build/bin/UnitTests.3fd.config
DEPENDS ${PROJECT_SOURCE_DIR}/application.config
)

Expand Down Expand Up @@ -87,4 +87,4 @@ target_link_libraries(UnitTests
install(
TARGETS UnitTests
DESTINATION "${PROJECT_SOURCE_DIR}/../build/bin"
)
)
2 changes: 1 addition & 1 deletion build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{ ls build || printf 'Run configure.sh first!'; } &> /dev/null

cd gtest
make install
make
cd ../3FD
make install
cd ../UnitTests
Expand Down
2 changes: 1 addition & 1 deletion configure.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

MODE=$1

if [[ $MODE == $(echo $MODE | grep -i 'debug\|release') ]];
if [[ -n $MODE ]] && [[ $MODE == $(echo $MODE | grep -i 'debug\|release') ]];
then
CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=$MODE -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=\"-std=c++11\""
else
Expand Down
20 changes: 11 additions & 9 deletions setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ AMAZON=$(cat /etc/issue | grep -i "amazon linux ami release" | awk -F" " '{print
#

if [ -n "$UBUNTU" ] && [ $UBUNTU -gt 14 ]; then
apt install -y clang
apt install -y cmake
apt install -y clang cmake unixodbc unixodbc-dev openssl libssl-dev

elif [ -n "$AMAZON" ] && [ $AMAZON -gt 2017 ]; then
yum groups install -y development
Expand Down Expand Up @@ -58,12 +57,15 @@ rm "$boostLabel.tar.bz2"
# INSTALL POCO
#
pocoLabel='poco-1.7.8p3'
wget "https://pocoproject.org/releases/poco-1.7.8/$pocoLabel.tar.gz"
tar -xf "$pocoLabel.tar.gz"
cd $pocoLabel
./configure --config=Linux-clang --static --no-tests --no-samples --prefix="/opt/$pocoLabel"
make -s -j2
pocoTarFile=$pocoLabel"-all.tar.gz"
pocoXDir=$pocoLabel"-all"
wget "https://pocoproject.org/releases/poco-1.7.8/$pocoTarFile"
tar -xf $pocoTarFile
cd $pocoXDir
./configure --omit=Data/MySQL,MongoDB,PageCompiler --config=Linux-clang --static --no-tests --no-samples --prefix="/opt/$pocoLabel"
make -s -j2 || exit
make install
cd ..
rm -rf $pocoLabel
rm "$pocoLabel.tar.gz"
rm -rf $pocoXDir
rm $pocoTarFile

0 comments on commit 694a4b4

Please sign in to comment.