Skip to content

Commit ae72999

Browse files
author
Duncan Crutchley
committed
Fixed issues with unit tests build scripts
1 parent 341d792 commit ae72999

6 files changed

Lines changed: 16 additions & 11 deletions

UnitTests/GoogleTests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ target_compile_definitions(CoreLibraryUnitTests PUBLIC
165165
target_include_directories(CoreLibraryUnitTests PUBLIC
166166
"${CORELIB_BOOST_ROOT}"
167167
../../Include
168+
../../Include/msgpack
168169
)
169170

170171
if(MSVC)
@@ -220,4 +221,4 @@ target_link_libraries(CoreLibraryUnitTests PRIVATE
220221
)
221222

222223
include(GoogleTest)
223-
gtest_discover_tests(CoreLibraryUnitTests)
224+
gtest_discover_tests(CoreLibraryUnitTests)

UnitTests/GoogleTests/build_linux_64bit_debug.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#!/bin/bash
22

33
bash test.proto_gen.sh
4+
bash test.flatbuffer_gen.sh
45

56
# Make sure you go to /Projvects/ThirdParty/libbacktrace and build and install libbacktrace.
67

78
set -e
89

910
export CORELIB_ROOT=/home/$USER/Projects/cpp/CoreLibrary
1011
export CORELIB_BOOST_ROOT=${CORELIB_ROOT}/../../../ThirdParty/boost_1_90_0
11-
export CORELIB_BOOST_LIB=${CORELIB_ROOT}/../../../ThirdParty/boost_1_90_0/lib64-msvc-14.3
12+
export CORELIB_BOOST_LIB=${CORELIB_ROOT}/../../../ThirdParty/boost_1_90_0/lib
1213
# Not nmeeded fo Linux build
1314
export CORELIB_BOOST_LIB_NAME_STUB=
1415
export CORELIB_BOOST_LIB_NAME_STUB_D=
@@ -17,7 +18,6 @@ export CORELIB_VCPKG_CMAKE_PATH=${CORELIB_ROOT}/../../../ThirdParty/vcpkg/script
1718
# Tidy previous installation/build folders.
1819
rm -rf build
1920

20-
# Create build files
2121
# E.g. CORELIB_DISABLE_ASIO_TESTS=ON, disables ASIO tests, CORELIB_DISABLE_ASIO_TESTS=OFF enables ASIO tests
2222
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="${CORELIB_VCPKG_CMAKE_PATH}" -DCORELIB_USE_STD_FILESYSTEM=ON -DCORELIB_DISABLE_ASIO_TESTS=OFF -DCORELIB_DISABLE_CSVGRID_TESTS=OFF -DCORELIB_DISABLE_DEBUGLOG_TESTS=OFF -DCORELIB_DISABLE_FILEUTILS_TESTS=OFF -DCORELIB_DISABLE_FLOAT_COMPARE_TESTS=OFF -DCORELIB_DISABLE_SORTING_TESTS=OFF -DCORELIB_DISABLE_GPROTOBUF_TESTS=OFF -DCORELIB_DISABLE_INIFILE_TESTS=OFF -DCORELIB_DISABLE_SERIALIZATIOFF_TESTS=OFF -DCORELIB_DISABLE_STRINGUTILS_TESTS=OFF -DCORELIB_DISABLE_THREADS_TESTS=OFF -DCORELIB_DISABLE_FLATBUFFER_TESTS=OFF
2323

@@ -28,4 +28,4 @@ cd build
2828

2929
ctest -C Debug
3030

31-
ctest
31+
ctest

UnitTests/GoogleTests/build_linux_64bit_release.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#!/bin/bash
22

33
bash test.proto_gen.sh
4+
bash test.flatbuffer_gen.sh
45

56
# Make sure you go to /Projvects/ThirdParty/libbacktrace and build and install libbacktrace.
67

78
set -e
89

910
export CORELIB_ROOT=/home/$USER/Projects/cpp/CoreLibrary
1011
export CORELIB_BOOST_ROOT=${CORELIB_ROOT}/../../../ThirdParty/boost_1_90_0
11-
export CORELIB_BOOST_LIB=${CORELIB_ROOT}/../../../ThirdParty/boost_1_90_0/lib64-msvc-14.3
12+
export CORELIB_BOOST_LIB=${CORELIB_ROOT}/../../../ThirdParty/boost_1_90_0/lib
1213
# Not nmeeded fo Linux build
1314
export CORELIB_BOOST_LIB_NAME_STUB=
1415
export CORELIB_BOOST_LIB_NAME_STUB_D=
@@ -25,4 +26,4 @@ cmake --build build --config Release
2526

2627
cd build
2728

28-
ctest -C Release
29+
ctest -C Release

UnitTests/GoogleTests/build_msvc2022_64bit_debug.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@echo off
22

33
call test.proto_gen.bat
4+
call test.flatbuffer_gen.bat
45

56
setlocal enabledelayedexpansion
67

UnitTests/GoogleTests/build_msvc2022_64bit_release.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@echo off
22

33
call test.proto_gen.bat
4+
call test.flatbuffer_gen.bat
45

56
setlocal enabledelayedexpansion
67

build_linux_64bit_release.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ rm -rf build
1818
rm -rf RelWithDebInfo
1919
mkdir -p RelWithDebInfo
2020

21-
mkdir -p RelWithDebInfo/static/bin
22-
mkdir -p RelWithDebInfo/dynamic/bin
21+
mkdir -p RelWithDebInfo/static
22+
mkdir -p RelWithDebInfo/dynamic
2323

2424
# Create build files
2525
cmake -Bbuild -DCMAKE_INSTALL_PREFIX="./RelWithDebInfo/dynamic" -DCMAKE_TOOLCHAIN_FILE="${CORELIB_VCPKG_CMAKE_PATH}" -DBUILD_SHARED_LIBS=ON -DCORELIB_USE_FLATBUFFERS=ON -DCORELIB_USE_STD_FILESYSTEM=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
@@ -28,9 +28,8 @@ cmake -Bbuild -DCMAKE_INSTALL_PREFIX="./RelWithDebInfo/dynamic" -DCMAKE_TOOLCHA
2828
cmake --build build -- -j$(nproc)
2929

3030
# Install
31-
cmake --install build --prefix "./RelWithDebInfo/dynamic"
31+
cp ./build/libCoreLibrary.so ./RelWithDebInfo/dynamic
3232

33-
# Static build
3433
rm -rf build
3534

3635
# Create build files
@@ -40,4 +39,6 @@ cmake -Bbuild -DCMAKE_INSTALL_PREFIX="./RelWithDebInfo/static" -DBUILD_SHARED_
4039
cmake --build build -- -j$(nproc)
4140

4241
# Install
43-
cmake --install build --prefix "./RelWithDebInfo/static"
42+
cp ./build/libCoreLibrary.a ./RelWithDebInfo/static
43+
44+
rm -rf build

0 commit comments

Comments
 (0)