Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to resolve compilation errors on macOS #60

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
*.aps
*.DS_Store
*.obj
Expand Down
15 changes: 10 additions & 5 deletions build_mac_debug64.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@

BUILD_DIR=cmake-build64
BUILD_TYPE=Debug
PROJECT_DIR=$(pwd)
DRIVER_BIN_DIR="$PROJECT_DIR/build/odbc/bin"

mkdir cmake-build64
cd cmake-build64
cmake ../src -DCMAKE_BUILD_TYPE="Debug" -DCODE_COVERAGE="ON" -DBUILD_SHARED_LIBS="OFF" -DWITH_TESTS="ON" -DWITH_CORE="OFF" -DWITH_ODBC="ON"
mkdir $BUILD_DIR
cd $BUILD_DIR
if [[ -z "${DCMAKE_TOOLCHAIN_FILE}" ]]; then
cmake ../src -DCMAKE_BUILD_TYPE="Debug" -DCODE_COVERAGE="ON" -DBUILD_SHARED_LIBS="OFF" -DWITH_TESTS="ON" -DWITH_CORE="OFF" -DWITH_ODBC="ON"
else
cmake ../src -DCMAKE_BUILD_TYPE="Debug" -DCODE_COVERAGE="ON" -DBUILD_SHARED_LIBS="OFF" -DWITH_TESTS="ON" -DWITH_CORE="OFF" -DWITH_ODBC="ON" -DCMAKE_TOOLCHAIN_FILE="$DCMAKE_TOOLCHAIN_FILE"
fi
cd ..

# Download the DocumentDB JDBC Driver
JDBC_DRIVER_VERSION="${JDBC_DRIVER_VERSION-1.2.0}"
if [ -z "$JDBC_DRIVER_VERSION" ]; then
JDBC_DRIVER_VERSION="1.2.0"
fi
JDBC_DRIVER_FILENAME="documentdb-jdbc-$JDBC_DRIVER_VERSION-all.jar"
JDBC_DRIVER_FULLPATH="$DRIVER_BIN_DIR/libs/$JDBC_DRIVER_FILENAME"
export DOCUMENTDB_HOME="$DRIVER_BIN_DIR"
Expand Down
11 changes: 8 additions & 3 deletions build_mac_release64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ BUILD_TYPE=Release
PROJECT_DIR=$(pwd)
DRIVER_BIN_DIR="$PROJECT_DIR/build/odbc/bin"

set -e
mkdir $BUILD_DIR
cd $BUILD_DIR
cmake ../src -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCODE_COVERAGE="OFF" -DBUILD_SHARED_LIBS="OFF" -DWITH_TESTS="ON" -DWITH_CORE="OFF" -DWITH_ODBC="ON"
if [[ -z "${DCMAKE_TOOLCHAIN_FILE}" ]]; then
cmake ../src -DCMAKE_BUILD_TYPE="Debug" -DCODE_COVERAGE="ON" -DBUILD_SHARED_LIBS="OFF" -DWITH_TESTS="ON" -DWITH_CORE="OFF" -DWITH_ODBC="ON"
else
cmake ../src -DCMAKE_BUILD_TYPE="Debug" -DCODE_COVERAGE="ON" -DBUILD_SHARED_LIBS="OFF" -DWITH_TESTS="ON" -DWITH_CORE="OFF" -DWITH_ODBC="ON" -DCMAKE_TOOLCHAIN_FILE="$DCMAKE_TOOLCHAIN_FILE"
fi
make -j 4

# Download the DocumentDB JDBC Driver
JDBC_DRIVER_VERSION="${JDBC_DRIVER_VERSION-1.2.0}"
if [ -z "$JDBC_DRIVER_VERSION" ]; then
JDBC_DRIVER_VERSION="1.2.0"
fi
JDBC_DRIVER_FILENAME="documentdb-jdbc-$JDBC_DRIVER_VERSION-all.jar"
JDBC_DRIVER_FULLPATH="$DRIVER_BIN_DIR/libs/$JDBC_DRIVER_FILENAME"
export DOCUMENTDB_HOME="$DRIVER_BIN_DIR"
Expand Down
1 change: 1 addition & 0 deletions src/core-test/src/teamcity_boost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <boost/test/unit_test_log.hpp>
#include <boost/test/unit_test_log_formatter.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/test/included/unit_test.hpp>

#include <sstream>

Expand Down
1 change: 1 addition & 0 deletions src/odbc-test/src/connection_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <sqlext.h>

#include <boost/test/unit_test.hpp>
#include <boost/test/included/unit_test.hpp>
#include <string>

#include "odbc_test_suite.h"
Expand Down
1 change: 1 addition & 0 deletions src/odbc-test/src/odbc_test_suite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <fstream>

#include <boost/test/unit_test.hpp>
#include <odbcinst.h>

#include "odbc_test_suite.h"
#include "test_utils.h"
Expand Down
1 change: 1 addition & 0 deletions src/odbc-test/src/teamcity/teamcity_boost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <boost/test/execution_monitor.hpp>
#include <boost/test/results_collector.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/test/included/unit_test.hpp>
#include <boost/test/unit_test_log.hpp>
#include <boost/test/unit_test_log_formatter.hpp>
#include <boost/test/utils/basic_cstring/io.hpp>
Expand Down
3 changes: 2 additions & 1 deletion src/odbc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ find_package(mongocxx REQUIRED)
find_package(bsoncxx REQUIRED)
find_package(Java REQUIRED)
find_package(JNI REQUIRED)
find_package(Boost REQUIRED)
include(UseJava)

include_directories(SYSTEM ${ODBC_INCLUDE_DIRS} ${JNI_INCLUDE_DIRS} ${MONGOCXX_INCLUDE_DIRS} ${BSONCXX_INCLUDE_DIRS})
include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${ODBC_INCLUDE_DIRS} ${JNI_INCLUDE_DIRS} ${MONGOCXX_INCLUDE_DIRS} ${BSONCXX_INCLUDE_DIRS})
include_directories(include)


Expand Down