Commit b2a16705 authored by Michal Kravcenko's avatar Michal Kravcenko

FIX: fixed compilation under LINUX

parents 581baf38 760a48e5
# Windows 10 with Boost and Exprtk
# downloaded and compiled locally as
# submodules
#
# Checks only compilation, not unit-tests!
win_1:
win_visual_studio:
tags:
- Win
before_script:
- call VsDevCmd.bat
- cd build_scripts/windows
- cd build_scripts\windows
- call win_download_dependencies.bat
- cd ../../
- cd ..\..
script:
- cd build_scripts/windows
- cd build_scripts\windows
- call win_VS_build_x64_debug.bat
- call win_run_tests.bat
- cd ../../
- cd ..\..
# Latest Ubuntu with Boost and Exprtk
# in system directories
ubuntu_1:
ubuntu_boost_system:
tags:
- centos7
......@@ -31,27 +29,32 @@ ubuntu_1:
- git clone https://github.com/ArashPartow/exprtk.git
- cp exprtk/exprtk.hpp /usr/include
- export TERM=xterm
- ./build-ci.sh
- cd build_scripts/linux
- ./linux_gcc_build_x64_debug.sh
- cd ../..
script: "./run_tests.sh"
script:
- cd build_scripts/linux
- './linux_run_tests.sh'
- cd ../..
# Latest Ubuntu with Boost and Exprtk
# compiled locally as submodules
ubuntu_2:
ubuntu_boost_local:
tags:
- centos7
image: martinbeseda/ubuntu-ci:latest
before_script:
- cd build_scripts/linux
- ./download_dependencies.sh
- cd external_dependencies/boost
- ./bootstrap.sh || cat bootstrap.log
- ./b2 --layout=system variant=release link=shared address-model=64
- cd ../..
- export TERM=xterm
script:
- './build-ci.sh'
- cd build_scripts/linux
- ./linux_gcc_build_x64_debug.sh
- './linux_run_tests.sh'
- cd ../..
cmake_minimum_required(VERSION 3.0)
project(lib4neuro)
ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB")
if(WIN32)
ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB")
else()
ADD_DEFINITIONS("-DBOOST_TEST_DYN_LINK")
endif()
#cmake_policy(SET CMP0074 NEW)
#cmake_policy(SET CMP0060 NEW)
......@@ -56,13 +60,15 @@ endif()
message("Looking for external libraries...")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
# TODO Instead use better FIND BOOST !!!
set(Boost_USE_MULTITHREADED ON)
set(Boost_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies/boost)
set(Boost_LIBRARY_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies/boost/stage/lib)
message("Boost INCLUDE DIR: ${Boost_INCLUDE_DIR}")
message("Boost LIB DIR: ${Boost_LIBRARY_DIRS}")
message("lib4neuro LIB DIR: ${LIB4NEURO_DIR}")
include_directories(${Boost_INCLUDE_DIR} ${Boost_INCLUDEDIR} ${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS} ${LIB4NEURO_DIR})
......@@ -92,6 +98,15 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
#
# Dependencies for the lib4neuro library
#
if(WIN32)
set(LINK_DEP_LIB4NEURO libboost_serialization libboost_system libboost_random libboost_unit_test libexprtk)
else()
set(LINK_DEP_LIB4NEURO boost_serialization boost_system boost_random boost_unit_test exprtk)
endif()
include_directories(include ${SRC_DIR})
message(" Running CMake in: ${SRC_DIR} ${PROJECT_BINARY_DIR}")
......
......@@ -7,6 +7,18 @@
# Build type (Release/Debug)
BUILD_TYPE=Debug
# Should the unit-tests be rebuilt? (yes/no)
BUILD_TESTS=yes
# Should the examples be rebuilt? (yes/no)
BUILD_EXAMPLES=yes
# Should the library itself be rebuilt? (yes/no)
BUILD_LIB=yes
# Location of the lib4neuro library file? (in case it was already compiled somewhere)
LIB4NEURO_BIN_DIR=build/lib
# C++ compiler
CXX_COMPILER="g++-8"
......@@ -16,5 +28,5 @@ if [ -z "$BUILD_TYPE" ] || [ -z "$CXX_COMPILER" ]; then
fi
$(pwd)/clean.sh
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CXX_COMPILER} .
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_ROOT=${BOOST_ROOT} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DLIB4NEURO_DIR=${LIB4NEURO_BIN_DIR} .
cmake --build . --config ${BUILD_TYPE} -- -j${N_CORES} && (tput setaf 2; echo "Build complete."; echo "For examples have a look at the folder build/bin/examples."; tput sgr 0; ) || (tput setaf 1; echo "Build finished with errors!"; tput sgr 0; exit 1;)
......@@ -5,10 +5,10 @@
#------------#
# Build type (Release/Debug)
BUILD_TYPE=
BUILD_TYPE=Release
# C++ compiler
CXX_COMPILER=
CXX_COMPILER=g++
if [ -z "$BUILD_TYPE" ] || [ -z "$CXX_COMPILER" ]; then
(>&2 echo "Set, please, both BUILD_TYPE and CXX_COMPILER variables in the 'build.sh' script.")
......
......@@ -32,25 +32,25 @@ set BUILD_SOMETHING_LIB=no
IF "%BUILD_LIB%"=="yes" (
echo Lib4neuro build type: Debug
echo Lib4neuro build architecture: x64
echo Lib4neuro will be built in 'build/lib/'
echo Lib4neuro will be built in 'build\lib\'
set BUILD_SOMETHING=yes
set BUILD_SOMETHING_LIB=yes
)
IF "%BUILD_TESTS%"=="yes" (
echo Lib4neuro unit tests will be built in 'build/unit-tests'
echo Lib4neuro unit tests will be built in 'build\unit-tests'
set BUILD_SOMETHING=yes
set BUILD_SOMETHING_LIB=yes
)
IF "%BUILD_EXAMPLES%"=="yes" (
echo Lib4neuro examples will be built in 'build/examples'
echo Lib4neuro examples will be built in 'build\examples'
set BUILD_SOMETHING=yes
set BUILD_SOMETHING_LIB=yes
)
IF "%REBUILD_BOOST%"=="yes" (
echo The required BOOST library will be recompiled in the directory 'external_dependencies/boost'
echo The required BOOST library will be recompiled in the directory 'external_dependencies\boost'
set BUILD_SOMETHING=yes
)
......@@ -62,16 +62,16 @@ IF "%BUILD_SOMETHING%"=="yes" (
rem Boost rebuild
IF "%REBUILD_BOOST%"=="yes" (
title Rebuilding 'BOOST' for Debug
cd ../../
cd ..\..
rmdir /s /q external_dependencies\boost\stage 2>NUL
rmdir /s /q external_dependencies\boost\bin.v2 2>NUL
cd external_dependencies/boost
cd external_dependencies\boost
.\b2 --layout=system variant=debug link=static address-model=64 --with-system --with-serialization --with-random
.\b2 --layout=system variant=debug link=static address-model=64 --with-system --with-serialization --with-random --with-test
cd ../../build_scripts/windows
cd ..\..\build_scripts\windows
)
IF "%BUILD_SOMETHING_LIB%"=="yes" (
......@@ -96,16 +96,16 @@ IF "%BUILD_SOMETHING_LIB%"=="yes" (
set MAKEFILE_GENERATOR="Visual Studio 15 2017 Win64"
cd ../../
cd ..\..
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=%CXX_COMPILER% -DCMAKE_C_COMPILER=%C_COMPILER% -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% -DBOOST_INCLUDEDIR=%BOOST_INCLUDEDIR% -DBUILD_TESTS=%BUILD_TESTS% -DBUILD_EXAMPLES=%BUILD_EXAMPLES% -DBUILD_LIB=%BUILD_LIB% -DLIB4NEURO_DIR=build\lib .
title Building the 'lib4neuro' project for Debug (building)
(cmake --build . --config Debug > build.log) && (echo "Build complete.") || (echo "Build finished with errors!")
cd build_scripts/windows
cd build_scripts\windows
IF "%BUILD_LIB%"=="yes" (
cd ../../
cd ..\..
rem Moving LIB files around to have a neater structure
xcopy /y build\bin\Debug\lib4neuro.dll build\lib 2>NUL
......@@ -113,35 +113,35 @@ IF "%BUILD_SOMETHING_LIB%"=="yes" (
rmdir /s /q "build\lib\Debug" 2> NUL
cd build_scripts/windows
cd build_scripts\windows
)
IF "%BUILD_EXAMPLES%"=="yes" (
cd ../../
cd ..\..
rem Moving EXAMPLE files around to have a neater structure
mkdir build\tmp
xcopy /y build\examples\bin\Debug\*.exe build\tmp 2>NUL
rmdir /s /q "build\examples" 2> NUL
mv build\tmp build\examples
move build\tmp build\examples
xcopy /y build\lib\*.dll build\examples 2>NUL
cd build_scripts/windows
cd build_scripts\windows
)
IF "%BUILD_TESTS%"=="yes" (
cd ../../
cd ..\..
rem Moving EXAMPLE files around to have a neater structure
mkdir build\tmp
xcopy /y build\unit-tests\bin\Debug\*.exe build\tmp 2>NUL
rmdir /s /q "build\unit-tests" 2> NUL
mv build\tmp build\unit-tests
move build\tmp build\unit-tests
xcopy /y build\lib\*.dll build\unit-tests 2>NUL
cd build_scripts/windows
cd build_scripts\windows
)
call win_clean_garbage.bat
......
......@@ -13,16 +13,16 @@ set "BUILD_SOMETHING_LIB="
rem call VsDevCmd.bat
rem Should we rebuild BOOST? (yes/no)
set REBUILD_BOOST=no
set REBUILD_BOOST=yes
rem Should we build the examples? (yes/no)
set BUILD_EXAMPLES=no
set BUILD_EXAMPLES=yes
rem Should we build the unit-tests? (yes/no)
set BUILD_TESTS=no
set BUILD_TESTS=yes
rem Should we build the lib4neuro library? (yes)
set BUILD_LIB=no
set BUILD_LIB=yes
rem **********************DO NOT CHANGE BEYOND THIS LINE****************************************
......@@ -32,25 +32,25 @@ set BUILD_SOMETHING_LIB=no
IF "%BUILD_LIB%"=="yes" (
echo Lib4neuro build type: Release
echo Lib4neuro build architecture: x64
echo Lib4neuro will be built in 'build/lib/'
echo Lib4neuro will be built in 'build\lib\'
set BUILD_SOMETHING=yes
set BUILD_SOMETHING_LIB=yes
)
IF "%BUILD_TESTS%"=="yes" (
echo Lib4neuro unit tests will be built in 'build/unit-tests'
echo Lib4neuro unit tests will be built in 'build\unit-tests'
set BUILD_SOMETHING=yes
set BUILD_SOMETHING_LIB=yes
)
IF "%BUILD_EXAMPLES%"=="yes" (
echo Lib4neuro examples will be built in 'build/examples'
echo Lib4neuro examples will be built in 'build\examples'
set BUILD_SOMETHING=yes
set BUILD_SOMETHING_LIB=yes
)
IF "%REBUILD_BOOST%"=="yes" (
echo The required BOOST library will be recompiled in the directory 'external_dependencies/boost'
echo The required BOOST library will be recompiled in the directory 'external_dependencies\boost'
set BUILD_SOMETHING=yes
)
......@@ -62,16 +62,16 @@ IF "%BUILD_SOMETHING%"=="yes" (
rem Boost rebuild
IF "%REBUILD_BOOST%"=="yes" (
title Rebuilding 'BOOST' for Release
cd ../../
cd ..\..
rmdir /s /q external_dependencies\boost\stage 2>NUL
rmdir /s /q external_dependencies\boost\bin.v2 2>NUL
cd external_dependencies/boost
cd external_dependencies\boost
.\b2 --layout=system variant=release link=static address-model=64 --with-system --with-serialization --with-random
.\b2 --layout=system variant=release link=static address-model=64 --with-system --with-serialization --with-random --with-test
cd ../../build_scripts/windows
cd ..\..\build_scripts\windows
)
IF "%BUILD_SOMETHING_LIB%"=="yes" (
......@@ -96,16 +96,16 @@ IF "%BUILD_SOMETHING_LIB%"=="yes" (
set MAKEFILE_GENERATOR="Visual Studio 15 2017 Win64"
cd ../../
cd ..\..
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=%CXX_COMPILER% -DCMAKE_C_COMPILER=%C_COMPILER% -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% -DBOOST_INCLUDEDIR=%BOOST_INCLUDEDIR% -DBUILD_TESTS=%BUILD_TESTS% -DBUILD_EXAMPLES=%BUILD_EXAMPLES% -DBUILD_LIB=%BUILD_LIB% -DLIB4NEURO_DIR=build\lib .
title Building the 'lib4neuro' project for Release (building)
(cmake --build . --config Release > build.log) && (echo "Build complete.") || (echo "Build finished with errors!")
cd build_scripts/windows
cd build_scripts\windows
IF "%BUILD_LIB%"=="yes" (
cd ../../
cd ..\..
rem Moving LIB files around to have a neater structure
xcopy /y build\bin\Release\lib4neuro.dll build\lib 2>NUL
......@@ -113,35 +113,35 @@ IF "%BUILD_SOMETHING_LIB%"=="yes" (
rmdir /s /q "build\lib\Release" 2> NUL
cd build_scripts/windows
cd build_scripts\windows
)
IF "%BUILD_EXAMPLES%"=="yes" (
cd ../../
cd ..\..
rem Moving EXAMPLE files around to have a neater structure
mkdir build\tmp
xcopy /y build\examples\bin\Release\*.exe build\tmp 2>NUL
rmdir /s /q "build\examples" 2> NUL
mv build\tmp build\examples
move build\tmp build\examples
xcopy /y build\lib\*.dll build\examples 2>NUL
cd build_scripts/windows
cd build_scripts\windows
)
IF "%BUILD_TESTS%"=="yes" (
cd ../../
cd ..\..
rem Moving EXAMPLE files around to have a neater structure
mkdir build\tmp
xcopy /y build\unit-tests\bin\Release\*.exe build\tmp 2>NUL
rmdir /s /q "build\unit-tests" 2> NUL
mv build\tmp build\unit-tests
move build\tmp build\unit-tests
xcopy /y build\lib\*.dll build\unit-tests 2>NUL
cd build_scripts/windows
cd build_scripts\windows
)
call win_clean_garbage.bat
......
@echo off
title Cleaning up 'examples'
cd ../../
cd ..\..
rmdir /s /q "build\examples" 2>NUL
cd build_scripts/windows
\ No newline at end of file
cd build_scripts\windows
\ No newline at end of file
@echo off
title Cleaning up after the party!
cd ../../
cd ..\..
rem Deleting unnecessary files
rmdir /s /q Debug 2>NUL
......@@ -10,29 +10,29 @@ rmdir /s /q Win32 2>NUL
rmdir /s /q x64 2>NUL
del "ALL_BUILD.vcxproj.user" 2>NUL
del "Makefile" 2>NUL
del /s /q "docs/*" 2>NUL
del /s /q "docs\*" 2>NUL
del "src/*TestRunner*" 2>NUL
del "src/*.o src/*.mod" 2>NUL
del "src/funit.tmp" 2>NUL
del "src/*_fun.f90" 2>NUL
del "src/*.o src\*.mod" 2>NUL
del "src\funit.tmp" 2>NUL
del "src\*_fun.f90" 2>NUL
del CMakeCache.txt 2>NUL
del "cmake_install.cmake" 2>NUL
del "src/cmake_install.cmake" 2>NUL
del "src\cmake_install.cmake" 2>NUL
del /s /q CMakeFiles 2>NUL
del "*.vcxproj" 2>NUL
del "*.vcxproj.filters" 2>NUL
del "*.sln" 2>NUL
rmdir /s /q "CMakeFiles" 2>NUL
rmdir /s /q "src/CMakeFiles" 2>NUL
rmdir /s /q "src/examples/CMakeFiles" 2>NUL
rmdir /s /q "src/tests/CMakeFiles" 2>NUL
rmdir /s /q "src\CMakeFiles" 2>NUL
rmdir /s /q "src\examples\CMakeFiles" 2>NUL
rmdir /s /q "src\tests\CMakeFiles" 2>NUL
rmdir /s /q "build/CMakeFiles" 2>NUL
rmdir /s /q "build/lib4neuro.dir" 2>NUL
rmdir /s /q "build/libexprtk.dir" 2>NUL
rmdir /s /q "build/bin" 2>NUL
rmdir /s /q "build\CMakeFiles" 2>NUL
rmdir /s /q "build\lib4neuro.dir" 2>NUL
rmdir /s /q "build\libexprtk.dir" 2>NUL
rmdir /s /q "build\bin" 2>NUL
del /q "build\*vcxproj*" 2>NUL
del /q "build\*cmake*" 2>NUL
cd build_scripts/windows
\ No newline at end of file
cd build_scripts\windows
\ No newline at end of file
@echo off
title Cleaning up 'lib4neuro'
cd ../../
cd ..\..
rmdir /s /q "build\lib" 2>NUL
rmdir /s /q "build\bin\Debug" 2>NUL
rmdir /s /q "build\bin\Release" 2>NUL
cd build_scripts/windows
\ No newline at end of file
cd build_scripts\windows
\ No newline at end of file
@echo off
title Cleaning up 'unit-tests'
cd ../../
cd ..\..
rmdir /s /q "build\unit-tests" 2>NUL
cd build_scripts/windows
\ No newline at end of file
cd build_scripts\windows
\ No newline at end of file
@echo off
title Downloading 'lib4neuro' project dependencies
mytitle="Downloading 'lib4neuro' project dependencies"
echo -e '\033]2;'$mytitle'\007'
cls
......@@ -24,12 +26,14 @@ IF "%DOWNLOAD_DEP%"=="yes" (
echo %cd%
rmdir /s /q external_dependencies 2>NUL
cd ..\..
rmdir /s /q "external_dependencies" 2>NUL
git submodule init
git submodule update --remote
cd external_dependencies\boost
cd external_dependencies\boost
echo %cd%
......
@echo off
title Running 'lib4neuro' unit-tests
cd ../../build/unit-tests
cd ..\..\build\unit-tests
rem Runs all the available Unit-Tests
for /r %%v in ("*_test.exe") do call %%v
cd ../../build_scripts/windows
\ No newline at end of file
cd ..\..\build_scripts\windows
\ No newline at end of file
#!/bin/sh
git submodule init
git submodule update
git submodule update --remote
cd external_dependencies/boost
git submodule init
......
Subproject commit 24fcd694127f1d548f90f718faa13ddfb426149b
Subproject commit 9a8474e7a259fa5348658a651cd19af216749674
......@@ -25,8 +25,14 @@ if ("${BUILD_LIB}" STREQUAL "yes")
LearningMethods/ILearningMethods.h
)
add_library(libexprtk STATIC exprtk.cpp)
target_link_libraries(lib4neuro libboost_serialization libboost_system libboost_random libexprtk)
if(WIN32)
add_library(libboost_unit_test STATIC boost_test_lib_dummy.cpp)
add_library(libexprtk STATIC exprtk.cpp)
target_link_libraries(lib4neuro ${LINK_DEP_LIB4NEURO})
else()
add_library(boost_unit_test SHARED boost_test_lib_dummy.cpp)
add_library(exprtk SHARED exprtk.cpp)
target_link_libraries(lib4neuro ${LINK_DEP_LIB4NEURO})
endif()
endif ()
......@@ -3,41 +3,41 @@
##############
add_executable(linear_neuron_test NeuronLinear_test.cpp)
target_link_libraries(linear_neuron_test lib4neuro)
target_link_libraries(linear_neuron_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(constant_neuron_test NeuronConstant_test.cpp)
target_link_libraries(constant_neuron_test lib4neuro)
target_link_libraries(constant_neuron_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(binary_neuron_test NeuronBinary_test.cpp)
target_link_libraries(binary_neuron_test lib4neuro)
target_link_libraries(binary_neuron_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(logistic_neuron_test NeuronLogistic_test.cpp)
target_link_libraries(logistic_neuron_test lib4neuro)
target_link_libraries(logistic_neuron_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(connectionFunctionGeneral_test ConnectionFunctionGeneral_test.cpp)
target_link_libraries(connectionFunctionGeneral_test lib4neuro)
target_link_libraries(connectionFunctionGeneral_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(neural_network_test NeuralNetwork_test.cpp)
target_link_libraries(neural_network_test lib4neuro)
target_link_libraries(neural_network_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(connection_Function_identity_test ConnectionFunctionIdentity_test.cpp)
target_link_libraries(connection_Function_identity_test lib4neuro)
target_link_libraries(connection_Function_identity_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(dataset_test DataSet_test.cpp)
target_link_libraries(dataset_test lib4neuro)
target_link_libraries(dataset_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(errorfunction_test ErrorFunctions_test.cpp)
target_link_libraries(errorfunction_test lib4neuro)
target_link_libraries(errorfunction_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(particle_swarm_test ParticleSwarm_test.cpp)
target_link_libraries(particle_swarm_test lib4neuro)
target_link_libraries(particle_swarm_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(particle_test Particle_test.cpp)
target_link_libraries(particle_test lib4neuro)
target_link_libraries(particle_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(NeuralNetworkSum_test NeuralNetworkSum_test.cpp)
target_link_libraries(NeuralNetworkSum_test lib4neuro)
target_link_libraries(NeuralNetworkSum_test lib4neuro ${LINK_DEP_LIB4NEURO})
add_executable(DESolver_test DESolver_test.cpp)
target_link_libraries(DESolver_test lib4neuro)
target_link_libraries(DESolver_test lib4neuro ${LINK_DEP_LIB4NEURO})
......@@ -8,10 +8,19 @@
#define BOOST_TEST_MODULE Connection_test
#ifdef _WINDOWS
#include <boost/test/included/unit_test.hpp>
#include <boost/test/included/unit_test.hpp>
#else
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif
#ifndef BOOST_TEST_NO_MAIN
#define BOOST_TEST_NO_MAIN
#endif
#include <boost/test/unit_test.hpp>
#include <boost/test/output_test_stream.hpp>
#endif
#include "../NetConnection/ConnectionFunctionGeneral.h"
......
......@@ -9,10 +9,19 @@
#define BOOST_TEST_MODULE ConnectionWeightIdentity_test
#ifdef _WINDOWS
#include <boost/test/included/unit_test.hpp>
#include <boost/test/included/unit_test.hpp>
#else
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif
#ifndef BOOST_TEST_NO_MAIN
#define BOOST_TEST_NO_MAIN
#endif
#include <boost/test/unit_test.hpp>
#include <boost/test/output_test_stream.hpp>
#endif
#include "../NetConnection/ConnectionFunctionIdentity.h"
......
......@@ -8,13 +8,20 @@
#define BOOST_TEST_MODULE DESolver_test
#ifdef _WINDOWS
#include <boost/test/included/unit_test.hpp>
#include <boost/test/included/unit_test.hpp>
#else
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/test/output_test_stream.hpp>
#endif
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif
#ifndef BOOST_TEST_NO_MAIN
#define BOOST_TEST_NO_MAIN
#endif
#include <boost/test/unit_test.hpp>
#include <boost/test/output_test_stream.hpp>
#endif
#include <iostream>
#include "../Solvers/DESolver.h"
......
......@@ -8,11 +8,19 @@
#define BOOST_TEST_MODULE DataSet_test
#ifdef _WINDOWS
#include <boost/test/included/unit_test.hpp>
#include <boost/test/included/unit_test.hpp>
#else
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/test/output_test_stream.hpp>
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif
#ifndef BOOST_TEST_NO_MAIN
#define BOOST_TEST_NO_MAIN
#endif
#include <boost/test/unit_test.hpp>
#include <boost/test/output_test_stream.hpp>
#endif
#include "../DataSet/DataSet.h"
......
......@@ -7,11 +7,19 @@
#define BOOST_TEST_MODULE ErrorFunctions_test
#ifdef _WINDOWS
#include <boost/test/included/unit_test.hpp>
#include <boost/test/included/unit_test.hpp>
#else
#define BOOST_TEST_NO_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/test/output_test_stream.hpp>
#ifndef BOOST_TEST_DYN_LINK
#define BOOST_TEST_DYN_LINK
#endif
#ifndef BOOST_TEST_NO_MAIN
#define BOOST_TEST_NO_MAIN
#endif
#include <boost/test/unit_test.hpp>
#include <boost/test/output_test_stream.hpp>
#endif
#include "../ErrorFunction/ErrorFunctions.h"
......
......@@ -8,13 +8,20 @@
#define BOOST_TEST_MODULE NeuralNetworkSum_test
#ifdef _WINDOWS
#include <boost/test/included/unit_test.hpp>