Skip to content
Snippets Groups Projects
Commit b9438fc0 authored by Michal Kravcenko's avatar Michal Kravcenko
Browse files

commit after merge

parents a25a2c58 f9cd7c58
No related branches found
No related tags found
No related merge requests found
Showing with 507 additions and 125 deletions
......@@ -4,7 +4,7 @@
win_visual_studio_static_local_deps:
tags:
- Win
before_script:
- call VsDevCmd.bat
- cd build_scripts\windows
......@@ -61,7 +61,6 @@ win_visual_studio_static_local_deps:
# - call win_run_tests.bat
# - cd ..\..
# Latest Ubuntu with Boost, Exprtk and Turtle
# in system directories, Boost
# installed from the official repository
......@@ -69,7 +68,7 @@ win_visual_studio_static_local_deps:
ubuntu_boost_system:
tags:
- centos7
image: martinbeseda/lib4neuro-ubuntu-system-deps:latest
before_script:
......@@ -97,9 +96,6 @@ ubuntu_boost_local_static_deps:
before_script:
- export TERM=xterm
- cd build_scripts/linux
- ./download_dependencies.sh
- cd ../..
- cd build_scripts/linux
- export DEPENDENCIES_LINK_TYPE=static
- export CLEAN_AFTER=yes
- ./linux_gcc_build_x64_debug_local.sh
......@@ -152,3 +148,4 @@ ubuntu_boost_local_static_deps:
# "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
# artifacts:
# paths: [gl-code-quality-report.json]
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.11)
project(lib4neuro)
message("Using CMake ${CMAKE_VERSION}")
#TODO request newer version of CMake >=3.12
#TODO use 'option' instead of 'set' for boolean variables!
#TODO rewrite to use add_compile_definitions
if(WIN32)
add_compile_options("/D BOOST_ALL_NO_LIB")
......@@ -58,7 +60,7 @@ endif()
# Automatic settings #
#--------------------#
if(CMAKE_BUILD_TYPE MATCHES DEBUG)
set(CMAKE_VERBOSE_MAKEFILE ON)
option(CMAKE_VERBOSE_MAKEFILE ON)
endif()
#------------------------------------------------------------------------------------#
......@@ -69,51 +71,92 @@ if (NOT ${MATCH} STREQUAL ${CMAKE_CURRENT_LIST_DIR})
message(FATAL_ERROR "Illegal character(s) found in the path to the current directory!")
endif()
#------------------------------------------#
# Detect maximum available number of cores #
# and set corresponding build options #
#------------------------------------------#
message("Detecting available cores count...")
include(ProcessorCount)
ProcessorCount(N_CORES)
if(N_CORES GREATER 1)
math(EXPR N_CORES "${N_CORES}-1")
set(CTEST_BUILD_FLAGS -j${N_CORES})
set(ENV{N_CORES} ${N_CORES})
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N_CORES})
endif()
message("Build will be performed on ${N_CORES} cores.")
#----------------------------------------#
# Set prefixes and suffixes of libraries #
#----------------------------------------#
set(LIB_PREFIX "lib")
set(LIB_SUFFIX "a") # suffix for Linux static libraries
if("${DEPENDENCIES_LINK_TYPE}" STREQUAL "shared" AND WIN32)
set(LIB_PREFIX "")
set(LIB_SUFFIX "dll")
elseif("${DEPENDENCIES_LINK_TYPE}" STREQUAL "static" AND WIN32)
set(LIB_SUFFIX "lib")
elseif("${DEPENDENCIES_LINK_TYPE}" STREQUAL "shared")
set(LIB_SUFFIX "so")
endif()
#-------------------------#
# Find external libraries #
#-------------------------#
#TODO download libraries using ExternalProject_Add() instead of external Bash script
message("Looking for external libraries...")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
set(Boost_USE_MULTITHREADED ON)
set(Boost_DEBUG ON)
#TODO make downloading dependencies arbitrary
option(ALLOW_DEPENDENCIES_DOWNLOAD "Allow external dependencies to be downloaded locally, if they're not found." ON)
option(Boost_USE_MULTITHREADED ON)
option(Boost_DEBUG ON)
find_package(
Boost
COMPONENTS
system
serialization
COMPONENTS
system
serialization
random
)
if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost was NOT found! Specify variables BOOST_INCLUDEDIR and BOOST_LIBRARYDIR!")
if((NOT Boost_FOUND) AND ALLOW_DEPENDENCIES_DOWNLOAD)
message("Boost will be downloaded and compiled locally in 'external_dependencies' folder.")
include(
DownloadBoost
RESULT_VARIABLE rv)
message("Boost download: " ${rv})
elseif(NOT Boost_FOUND)
message(FATAL_ERROR "Boost was not found! Set variables BOOST_LIBRARYDIR and BOOST_INCLUDEDIR manually or set ALLOW_DEPENDENCIES_DOWNLOAD to ON to allow automatic download and compilation of Boost.")
endif()
find_package(exprtk)
message("EXPRTK_INCLUDE_DIRS: ${EXPRTK_INCLUDE_DIRS}")
find_package(Exprtk)
if(NOT EXPRTK_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
message("Exprt will be downloaded and compiled locally in 'external_dependencies' folder.")
include(DownloadExprtk)
endif()
find_package(Turtle)
message("TURTLE_INCLUDE_DIR: ${TURTLE_INCLUDE_DIR}")
if(NOT TURTLE_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
message("Turtle will be downloaded and compiled locally in 'external_dependencies' folder.")
include(DownloadTurtle)
endif()
message("Checking Armadillo dependencies")
find_package(LAPACK)
find_package(BLAS)
find_package(OpenBLAS)
if(NOT LAPACK_FOUND AND NOT BLAS_FOUND AND NOT OpenBLAS_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
# Download and build OpenBLAS locally
message("LAPACK nor BLAS were found - OpenBLAS will be downloaded and built.")
include(DownloadOpenBLAS)
endif()
#------------------------------------------#
# Detect maximum available number of cores #
# and set corresponding build options #
#------------------------------------------#
message("Detecting available cores count...")
include(ProcessorCount)
ProcessorCount(n_cores)
if(n_cores GREATER 1)
math(EXPR n_cores "${n_cores}-1")
message("Build will be performed on ${n_cores} cores.")
set(CTEST_BUILD_FLAGS -j${N})
set(ENV{N_CORES} ${N})
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
find_package(Armadillo)
if(NOT ARMADILLO_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD)
message("Armadillo will be downloaded and compiled locally in 'external_dependencies folder.")
include(DownloadArmadillo)
endif()
#---------------#
......
set(ARMADILLO_LOCAL_PATH ${CMAKE_CURRENT_LIST_DIR}/external_dependencies/armadillo)
include(FetchContent)
######################
# Download Armadillo #
######################
FetchContent_Declare(
armadillo
SOURCE_DIR ${ARMADILLO_LOCAL_PATH}
GIT_REPOSITORY https://gitlab.com/conradsnicta/armadillo-code.git
GIT_TAG 9.300.x #TODO do some general solution!
)
set(FETCHCONTENT_QUIET FALSE)
FetchContent_Populate(armadillo)
find_package(Armadillo)
if(NOT ARMADILLO_FOUND)
message(FATAL_ERROR "Armadillo was not downloaded successfully!")
endif()
message("DownloadBoost starting...")
set(BOOST_LOCAL_PATH ${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost)
include(FetchContent)
##################
# Download Boost #
##################
set(WINAPI_BOOST_LIB "")
if(WIN32)
set(WINAPI_BOOST_LIB libs/winapi)
endif()
FetchContent_Declare(
boost
SOURCE_DIR ${BOOST_LOCAL_PATH}
GIT_REPOSITORY https://github.com/boostorg/boost.git
GIT_SUBMODULES tools/build tools/boost_install
libs/system libs/random libs/serialization
libs/config libs/headers libs/assert libs/core
libs/integer libs/type_traits libs/mpl
libs/preprocessor libs/throw_exception
libs/utility libs/static_assert libs/smart_ptr
libs/predef libs/move libs/io libs/iterator
libs/detail libs/spirit libs/optional
libs/function libs/type_index libs/bind
libs/container_hash libs/array libs/test
libs/timer libs/exception libs/algorithm
libs/range libs/numeric libs/format
libs/lexical_cast libs/concept_check
libs/container libs/math libs/function_types
libs/typeof ${WINAPI_BOOST_LIB}
)
set(FETCHCONTENT_QUIET FALSE)
FetchContent_Populate(boost)
###############
# Build Boost #
###############
set(BOOTSTRAP_CMD sh bootstrap.sh)
set(B2_CMD ./b2 -j${N_CORES})
if(WIN32)
set(BOOTSTRAP_CMD bootstrap.bat)
set(B2_CMD b2 -j${N_CORES})
endif()
execute_process(
COMMAND ${BOOTSTRAP_CMD}
WORKING_DIRECTORY ${BOOST_LOCAL_PATH}
RESULT_VARIABLE rv
)
if(NOT rv STREQUAL "0")
message("Boost build: bootstrap: ${rv}")
endif()
execute_process(
COMMAND ${B2_CMD} headers
WORKING_DIRECTORY ${BOOST_LOCAL_PATH}
RESULT_VARIABLE rv
)
if(NOT rv STREQUAL "0")
message("Boost build: b2 headers: ${rv}")
endif()
execute_process(
COMMAND ${B2_CMD} -q cxxflags=-fPIC --layout=system variant=debug link=${DEPENDENCIES_LINK_TYPE} address-model=64 --with-system --with-serialization --with-random
WORKING_DIRECTORY ${BOOST_LOCAL_PATH}
RESULT_VARIABLE rv
)
if(NOT rv STREQUAL "0")
message("Boost build: b2: ${rv}")
endif()
find_package(
Boost
COMPONENTS
system
serialization
random
)
if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost was not downloaded successfully!")
endif()
set(EXPRTK_LOCAL_PATH ${CMAKE_CURRENT_LIST_DIR}/external_dependencies/exprtk)
include(FetchContent)
###################
# Download exprtk #
###################
FetchContent_Declare(
exprtk
SOURCE_DIR ${EXPRTK_LOCAL_PATH}
GIT_REPOSITORY https://github.com/ArashPartow/exprtk.git
)
set(FETCHCONTENT_QUIET FALSE)
FetchContent_Populate(exprtk)
find_package(Exprtk)
if(NOT EXPRTK_FOUND)
message(FATAL_ERROR "Exprtk was not downloaded successfully!")
endif()
message("DownloadOpenBLAS starting...")
set(OPENBLAS_LOCAL_PATH ${CMAKE_CURRENT_LIST_DIR}/external_dependencies/OpenBLAS)
include(FetchContent)
#####################
# Download OpenBLAS #
#####################
FetchContent_Declare(
OpenBLAS
SOURCE_DIR ${OPENBLAS_LOCAL_PATH}
GIT_REPOSITORY https://github.com/xianyi/OpenBLAS.git
)
set(FETCHCONTENT_QUIET FALSE)
FetchContent_Populate(OpenBLAS)
##################
# Build OpenBLAS #
##################
#execute_process(
# COMMAND cmake -j ${N_CORES} .
# WORKING_DIRECTORY ${OPENBLAS_LOCAL_PATH}
# RESULT_VARIABLE rv
#)
#if(NOT rv STREQUAL "0")
# message("OpenBLAS build: cmake .: ${rv}")
#endif()
#
#execute_process(
# COMMAND cmake --build . -j ${N_CORES} --config Release
# WORKING_DIRECTORY ${OPENBLAS_LOCAL_PATH}
# RESULT_VARIABLE rv
#)
#if(NOT rv STREQUAL "0")
# message("OpenBLAS build: cmake --build . -j ${N_CORES}: ${rv}")
#endif()
set(OpenBLAS_DIR ${CMAKE_CURRENT_LIST_DIR}/external_dependencies/OpenBLAS)
find_package(OpenBLAS)
if(NOT BLAS_FOUND)
message(FATAL_ERROR "OpenBLAS was not downloaded successfully!")
else()
message("OpenBLAS libraries: " ${BLAS_LIBRARIES})
endif()
set(TURTLE_LOCAL_PATH ${CMAKE_CURRENT_LIST_DIR}/external_dependencies/turtle)
include(FetchContent)
###################
# Download exprtk #
###################
FetchContent_Declare(
turtle
SOURCE_DIR ${TURTLE_LOCAL_PATH}
GIT_REPOSITORY https://github.com/mat007/turtle.git
)
set(FETCHCONTENT_QUIET FALSE)
FetchContent_Populate(turtle)
find_package(Turtle)
if(NOT TURTLE_FOUND)
message(FATAL_ERROR "Turtle was not downloaded successfully!")
endif()
message("FindArmadillo starting...")
# Find headers
FIND_PATH(
ARMADILLO_INCLUDE_DIR
NAMES
armadillo
HINTS
$ENV{ARMADILLO_INCLUDE_DIR}
${ARMADILLO_INCLUDE_DIR}
external_dependencies/armadillo/
PATHS
/usr
/usr/local
/home
/opt/local
PATH_SUFFIXES
include
armadillo
include/armadillo
)
# Is Armadillo downloaded locally?
option(LOCAL OFF)
IF(${ARMADILLO_INCLUDE_DIR} MATCHES "^.*external_dependencies.*$")
message("Armadillo is downloaded locally - the library will be built when needed.")
set(LOCAL ON)
set(TMP "")
string(REGEX REPLACE "/include" "" TMP ${ARMADILLO_INCLUDE_DIR})
add_subdirectory(${TMP} ${TMP})
endif()
if(LOCAL)
# If Armadillo is downloaded locally, the library will be compiled during build-time
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
armadillo
"Armadillo was NOT found!"
ARMADILLO_INCLUDE_DIR)
else()
# Find library
set(LIBNAME ${LIB_PREFIX}armadillo.so)
FIND_LIBRARY(
ARMADILLO_LIBRARY_DIR
NAMES
${LIBNAME}
HINTS
external_dependencies/armadillo
PATHS
/usr/lib
/usr/local/lib
)
# Set ARMADILLO_FOUND honoring the QUIET and REQUIRED arguments
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
armadillo
"Armadillo was NOT found!"
ARMADILLO_INCLUDE_DIR
ARMADILLO_LIBRARY_DIR)
endif()
\ No newline at end of file
......@@ -46,6 +46,7 @@ find_path(
${BOOST_INCLUDEDIR}
$ENV{BOOST_INCLUDEDIR}
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost/src/boost
PATHS
/usr/include
......@@ -63,7 +64,7 @@ string(REPLACE "/boost/boost" "/boost" TMP ${Boost_INCLUDE_DIRS})
list(APPEND Boost_INCLUDE_DIRS ${TMP})
if(NOT Boost_INCLUDE_DIRS)
message(FATAL_ERROR "Boost include directory was not found! Please, set variable BOOST_INCLUDEDIR to the correct path.")
# message(FATAL_ERROR "Boost include directory was not found! Please, set variable BOOST_INCLUDEDIR to the correct path.")
else()
message("Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
endif()
......@@ -73,17 +74,6 @@ if(NOT DEPENDENCIES_LINK_TYPE)
message(FATAL_ERROR "Variable DEPENDENCIES_LINK_TYPE is not set! Set it to 'static' or 'shared'.")
endif()
set(LIB_PREFIX "lib")
set(LIB_SUFFIX "a") # suffix for Linux static libraries
if("${DEPENDENCIES_LINK_TYPE}" STREQUAL "shared" AND WIN32)
set(LIB_PREFIX "")
set(LIB_SUFFIX "dll")
elseif("${DEPENDENCIES_LINK_TYPE}" STREQUAL "static" AND WIN32)
set(LIB_SUFFIX "lib")
elseif("${DEPENDENCIES_LINK_TYPE}" STREQUAL "shared")
set(LIB_SUFFIX "so")
endif()
set(REQUESTED_BOOST_LIBS "")
foreach(COMPONENT ${Boost_FIND_COMPONENTS})
list(APPEND REQUESTED_BOOST_LIBS "${LIB_PREFIX}boost_${COMPONENT}.${LIB_SUFFIX}")
......@@ -106,6 +96,7 @@ find_path(
${BOOST_LIBRARYDIR}
$ENV{BOOST_LIBRARYDIR}
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost/src/boost
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost/stage
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost/stage/lib
......@@ -119,53 +110,56 @@ find_path(
)
if(NOT Boost_LIBRARY_DIRS)
message(FATAL_ERROR "Boost library directory was not found! Please, set variable BOOST_LIBRARYDIR to the correct path.")
#message(FATAL_ERROR "Boost library directory was not found! Please, set variable BOOST_LIBRARYDIR to the correct path.")
else()
message("Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}")
endif()
# Construct list of libraries' names and make them
# targets, so they may be linked
set(Boost_LIBRARIES "")
foreach(LIBNAME ${REQUESTED_BOOST_LIBS})
message("Looking for ${LIBNAME}...")
set(${LIBNAME} "${LIBNAME}-NOTFOUND")
find_library(
${LIBNAME}
NAMES
${LIBNAME}
PATHS
${Boost_LIBRARY_DIRS}
PATH_SUFFIXES
stage/lib
lib
NO_DEFAULT_PATH
)
message("${LIBNAME} ${${LIBNAME}}")
# Check, if the Boost component was found
if("${${LIBNAME}}" STREQUAL "${LIBNAME}-NOTFOUND")
message(FATAL_ERROR "Boost library ${LIBNAME} was NOT found!\
Please, set variable BOOST_LIBRARYDIR to the correct path and check the library names\
format in your Boost installation.")
else()
message("${LIBNAME} was found: ${${LIBNAME}}")
endif()
list(APPEND Boost_LIBRARIES ${${LIBNAME}})
endforeach()
if(NOT Boost_LIBRARY_DIRS)
message(FATAL_ERROR "Boost library directory was not found! Please, set variable BOOST_LIBRARYDIR to the correct path.")
# targets, so they may be linked
set(Boost_LIBRARIES "")
foreach(LIBNAME ${REQUESTED_BOOST_LIBS})
message("Looking for ${LIBNAME}...")
set(${LIBNAME} "${LIBNAME}-NOTFOUND")
find_library(
${LIBNAME}
NAMES
${LIBNAME}
PATHS
${Boost_LIBRARY_DIRS}
PATH_SUFFIXES
stage/lib
lib
NO_DEFAULT_PATH
)
# Check, if the Boost component was found
if("${${LIBNAME}}" STREQUAL "${LIBNAME}-NOTFOUND")
#message(FATAL_ERROR "Boost library ${LIBNAME} was NOT found!\
# Please, set variable BOOST_LIBRARYDIR to the correct path and check the library names\
# format in your Boost installation.")
else()
message("${LIBNAME} was found: ${${LIBNAME}}")
# Add every found library as an IMPORTED target
string(TOUPPER ${DEPENDENCIES_LINK_TYPE} TMP)
string(REGEX REPLACE "^lib" "" TARGET_NAME ${LIBNAME})
string(REGEX REPLACE "\\.[a-z]*$" "" TARGET_NAME ${TARGET_NAME})
add_library(${TARGET_NAME} ${TMP} IMPORTED)
set_target_properties(${TARGET_NAME} PROPERTIES IMPORTED_LOCATION ${${LIBNAME}})
message("Created IMPORTED library target: ${TARGET_NAME}")
endif()
list(APPEND Boost_LIBRARIES ${${LIBNAME}})
endforeach()
endif()
# Set Boost_FOUND
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
......@@ -179,6 +173,8 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
Boost_LIBRARY_DIRS
)
message("Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message("Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}")
message("Boost_LIBRARIES: ${Boost_LIBRARIES}")
if(Boost_FOUND)
message("Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message("Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}")
message("Boost_LIBRARIES: ${Boost_LIBRARIES}")
endif()
......@@ -9,6 +9,8 @@
#
################################################################################
message("FindExprtk starting...")
# Find headers and libraries
FIND_PATH(
EXPRTK_INCLUDE_DIR
......@@ -42,8 +44,9 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
IF(EXPRTK_FOUND)
# Include dirs
SET(EXPRTK_INCLUDE_DIRS ${EXPRTK_INCLUDE_DIR})
message("Exprtk was successfully found.")
ELSE()
MESSAGE(FATAL_ERROR "Set, please, the environmental variable EXPRTK_INCLUDE_DIR to the folder, where 'exprtk.hpp' is located...")
#MESSAGE(FATAL_ERROR "Set, please, the environmental variable EXPRTK_INCLUDE_DIR to the folder, where 'exprtk.hpp' is located...")
ENDIF(EXPRTK_FOUND)
# Advanced options for not cluttering the cmake UIs:
......
message("FindOpenBLAS starting...")
set(OpenBLAS_ROOT external_dependencies/OpenBLAS)
FIND_PATH(
OpenBLAS_INCLUDE_DIR
NAMES
cblas.h
HINTS
${OpenBLAS_INCLUDE_DIRECTORY}
$ENV{OpenBLAS_INCLUDE_DIRECTORY}
/usr/include/
/usr/include/x86_64-linux-gnu
external_dependencies/OpenBLAS
)
FIND_LIBRARY(OpenBLAS_LIBRARIES
NAMES
${LIB_PREFIX}openblas.${LIB_SUFFIX}
HINTS
${OpenBLAS_LIBRARY_DIRECTORY}
$ENV{OpenBLAS_LIBRARY_DIRECTORY}
/usr/lib
/usr/lib/x86_64-linux-gnu
external_dependencies/OpenBLAS/lib
)
# Set OpenBLAS_Found
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
OpenBLAS
FAIL_MESSAGE
"OpenBLAS was NOT found!"
REQUIRED_VARS
OpenBLAS_INCLUDE_DIR
OpenBLAS_LIBRARIES
)
IF (OpenBLAS_FOUND)
MESSAGE(STATUS "Found OpenBLAS libraries: ${OpenBLAS_LIBRARIES}")
MESSAGE(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}")
ELSE()
MESSAGE("Could not find OpenBLAS")
ENDIF()
message("FindTurtle starting...")
# Find headers and libraries
FIND_PATH(
TURTLE_INCLUDE_DIR
......@@ -33,8 +35,9 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
IF(TURTLE_FOUND)
# Include dirs
SET(TURTLE_INCLUDE_DIRS ${TURTLE_INCLUDE_DIR})
message("Turtle was successfully found.")
ELSE()
MESSAGE(FATAL_ERROR "Set, please, the environmental variable TURTLE_INCLUDE_DIR to the folder, where 'mock.hpp' is located...")
# MESSAGE(FATAL_ERROR "Set, please, the environmental variable TURTLE_INCLUDE_DIR to the folder, where 'mock.hpp' is located...")
ENDIF(TURTLE_FOUND)
# Add path only to the 'include' folder
......
......@@ -2,10 +2,10 @@
set CLEAN_AFTER=no
call clean.bat
rem call clean.bat
cd build_scripts\windows
call win_download_dependencies
rem call win_download_dependencies
set DEPENDENCIES_LINK_TYPE=static
call win_VS_build_x64_debug.bat
cd ..\..
......@@ -2,10 +2,9 @@
export CLEAN_AFTER=no
./clean.sh
#./clean.sh
cd build_scripts/linux
./download_dependencies.sh
export DEPENDENCIES_LINK_TYPE=shared
export DEPENDENCIES_LINK_TYPE=static
./linux_gcc_build_x64_debug_local.sh
cd ../..
......@@ -13,7 +13,7 @@ BUILD_EXAMPLES=yes
BUILD_TESTS=yes
# Should we rebuild BOOST? (yes/no)
REBUILD_BOOST=yes
#REBUILD_BOOST=yes
# Should we build the lib4neuro library? (yes)
BUILD_LIB=yes
......@@ -75,20 +75,19 @@ then
BUILD_SOMETHING_LIB=yes
fi
if [ ${REBUILD_BOOST} = "yes" ]
then
echo "The required '${CYAN}BOOST${NC}' library will be recompiled in the directory '${YELLOW}external_dependencies/boost${NC}'"
rm -rf ../../external_dependencies/boost/stage
rm -rf ../../external_dependencies/boost/bin.v2
BUILD_SOMETHING=yes
fi
#if [ ${REBUILD_BOOST} = "yes" ]
#then
# echo "The required '${CYAN}BOOST${NC}' library will be recompiled in the directory '${YELLOW}external_dependencies/boost${NC}'"
# rm -rf ../../external_dependencies/boost/stage
# rm -rf ../../external_dependencies/boost/bin.v2
# BUILD_SOMETHING=yes
#fi
# Boost rebuild
if [ ${REBUILD_BOOST} = "yes" ]
then
./build_boost_gcc.sh || BUILD_ERROR_OCCURED=1
fi
#if [ ${REBUILD_BOOST} = "yes" ]
#then
# ./build_boost_gcc.sh || BUILD_ERROR_OCCURED=1
#fi
# Should we build the lib4neuro library? (yes)
if [ ${BUILD_SOMETHING_LIB} = "yes" -a $BUILD_ERROR_OCCURED = "0" ]
......
......@@ -71,8 +71,8 @@ IF "%BUILD_EXAMPLES%"=="yes" (
)
IF "%REBUILD_BOOST%"=="yes" (
echo The required BOOST library will be recompiled in the directory 'external_dependencies\boost'
set BUILD_SOMETHING=yes
rem echo The required BOOST library will be recompiled in the directory 'external_dependencies\boost'
rem set BUILD_SOMETHING=yes
)
IF "%BUILD_SOMETHING%"=="yes" (
......@@ -82,17 +82,17 @@ IF "%BUILD_SOMETHING%"=="yes" (
rem Boost rebuild
IF "%REBUILD_BOOST%"=="yes" (
title Rebuilding 'BOOST' for Debug
cd ..\..
rmdir /s /q external_dependencies\boost\stage 2>NUL
rmdir /s /q external_dependencies\boost\bin.v2 2>NUL
cd external_dependencies\boost
.\b2 -q --layout=system variant=debug link=%LINK_TYPE% address-model=64 --with-system --with-serialization --with-random || goto error_occured_boost
cd ..\..\build_scripts\windows
rem title Rebuilding 'BOOST' for Debug
rem cd ..\..
rem
rem rmdir /s /q external_dependencies\boost\stage 2>NUL
rem rmdir /s /q external_dependencies\boost\bin.v2 2>NUL
rem
rem cd external_dependencies\boost
rem
rem .\b2 -q --layout=system variant=debug link=%LINK_TYPE% address-model=64 --with-system --with-serialization --with-random || goto error_occured_boost
rem
rem cd ..\..\build_scripts\windows
)
IF "%BUILD_SOMETHING_LIB%"=="yes" (
......
......@@ -18,3 +18,5 @@ 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 external_dependencies 2>NUL
rmdir /s /q _deps
......@@ -9,3 +9,5 @@ rm -f src/funit.tmp src/*_fun.f90
rm -f CMakeCache.txt
rm -f cmake_install.cmake src/cmake_install.cmake
rm -rf CMakeFiles src/CMakeFiles src/examples/CMakeFiles src/tests/CMakeFiles
rm -rf external_dependencies/*
rm -rf _deps
Subproject commit a86cf5b7c6742da6113b598a8d9c0c3a3cdf8175
Subproject commit d7d15be791bffc9f64e4c65b123a5f37c6a9b032
......@@ -17,10 +17,21 @@
#include "../src/Neuron/NeuronLogistic.h"
#include "../src/Solvers/DESolver.h"
#include "../src/ErrorFunction/ErrorFunctions.h"
#include "../src/LearningMethods/ParticleSwarm.h"
#include "../src/LearningMethods/GradientDescent.h"
#include "../src/LearningMethods/GradientDescentBB.h"
#include "../src/LearningMethods/GradientDescentSingleItem.h"
#include "../src/LearningMethods/LearningSequence.h"
#include "../src/LearningMethods/LevenbergMarquardt.h"
#include "../src/constants.h"
#include "../src/CSVReader/CSVReader.h"
#include "../src/CrossValidator/CrossValidator.h"
#include "../src/message.h"
#include "../src/exceptions.h"
// Abbreaviate lib4neuro namespace to l4n
namespace l4n = lib4neuro;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment