diff --git a/CMakeLists.txt b/CMakeLists.txt index 0efc69da8f5e4c805b8e8f4bcd951bf9edbae457..e2d144ea55022784eb8a1155445b348054bba7d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,259 +1,264 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.13) - -PROJECT(lib4neuro) - -MESSAGE(STATUS "lib4neuro CMake starting...") -MESSAGE(STATUS "Using CMake ${CMAKE_VERSION}") - -#TODO use 'option' instead of 'set' for boolean variables! - -#---------------# -# DEBUG options # -#---------------# -# Print target dependencies during a configuration phase -# set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_DEBUG_MODE 1) - -# Debug memory errors -#add_compile_options(-fsanitize=address) -#add_link_options(-fsanitize=address -static-libasan) - -# Compile for profiling with GProf -# - binaries need to be run to create gmon.out file and -# 'gprof' command is run subsequently! -#ADD_COMPILE_OPTIONS(-pg) -#ADD_LINK_OPTIONS(-pg) - -#------------------------------------------# -# 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}) - - # Create scripts for setting N_CORES in the parent process - IF(WIN32) - FILE(WRITE set_env_n_cores.bat "set N_CORES=${N_CORES}") - ELSE() - FILE(WRITE set_env_n_cores "export N_CORES=${N_CORES}") - ENDIF() - - SET(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N_CORES}) -ENDIF() -MESSAGE(STATUS "Build can be performed on ${N_CORES} cores.") - -#TODO use just locally, where needed -IF(WIN32) - ADD_COMPILE_DEFINITIONS(BOOST_ALL_NO_LIB NOMINMAX) -ELSE() - ADD_COMPILE_DEFINITIONS(BOOST_TEST_DYN_LINK) -ENDIF() -ADD_COMPILE_DEFINITIONS(ARMA_DONT_USE_WRAPPER) -ADD_COMPILE_DEFINITIONS(BOOST_LIB_DIAGNOSTIC) - -#------------# -# Build type # -#------------# -# Release / None / Debug -IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE RELEASE CACHE STRING - "Choose the type of build, options are: None Debug Release." - FORCE) -ELSEIF(${CMAKE_BUILD_TYPE} STREQUAL "Debug") - ADD_COMPILE_DEFINITIONS("L4N_DEBUG") - -ELSEIF(${CMAKE_BUILD_TYPE} STREQUAL "Release") - IF(WIN32) - ADD_COMPILE_DEFINITIONS(_ITERATOR_DEBUG_LEVEL=0) - ENDIF() -ENDIF(NOT CMAKE_BUILD_TYPE) -MESSAGE(STATUS CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}) - -#------------------------# -# Dependencies link type # -#------------------------# -IF(NOT DEPENDENCIES_LINK_TYPE AND NOT ENV{DEPENDENCIES_LINK_TYPE}) - SET(DEPENDENCIES_LINK_TYPE "static") - MESSAGE("DEPENDENCIES_LINK_TYPE is not specified - lib4neuro is going to be linked statically.") -ELSEIF(ENV{DEPENDENCIES_LINK_TYPE}) - SET(DEPENDENCIES_LINK_TYPE ENV{DEPENDENCIES_LINK_TYPE}) -ENDIF() - -#--------------------------------# -# Setting C++ compiler flags # -#--------------------------------# -SET(CMAKE_CXX_STANDARD 17) -SET(BOOST_TOOLSET "") -IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost") - SET(BOOST_TOOLSET --toolset=intel) -ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0 /bigobj") - ADD_COMPILE_OPTIONS("/D _SCL_SECURE_NO_WARNINGS") - ADD_COMPILE_OPTIONS("/D _CRT_SECURE_NO_WARNINGS") - - if("${MSVC_TOOLSET_VERSION}" STREQUAL "140") - SET(BOOST_TOOLSET --toolset=msvc-14.0) - elseif("${MSVC_TOOLSET_VERSION}" STREQUAL "141") - SET(BOOST_TOOLSET --toolset=msvc-15.0) - else() - SET(BOOST_TOOLSET --toolset=msvc) - endif() - -ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MINGW") - SET(BOOST_TOOLSET --toolset=gcc) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mbig-obj") -ELSE() - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") -ENDIF() - -#--------------------# -# Automatic settings # -#--------------------# -IF(CMAKE_BUILD_TYPE MATCHES DEBUG) - OPTION(CMAKE_VERBOSE_MAKEFILE ON) -ENDIF() - -#------------------------------------------------------------------------------------# -# Check, if the path to the current directory does contain some unallowed characters # -#------------------------------------------------------------------------------------# -STRING(REGEX MATCH "[A-Za-z0-9 \\\\/:_-]*" MATCH ${CMAKE_CURRENT_LIST_DIR}) -IF(NOT ${MATCH} STREQUAL ${CMAKE_CURRENT_LIST_DIR}) - MESSAGE(FATAL_ERROR "Illegal character(s) found in the path to the current directory!") -ENDIF() - -#---------------# -# Set variables # -#---------------# -SET(ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}) -SET(SRC_DIR ${ROOT_DIR}/src) -SET(PROJECT_BINARY_DIR ${ROOT_DIR}/build) - -#----------------------------------------# -# 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 # -#-------------------------# -MESSAGE("Looking for external libraries...") -SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) - -#TODO make downloading dependencies arbitrary -OPTION(ALLOW_DEPENDENCIES_DOWNLOAD "Allow external dependencies to be downloaded locally, if they're not found." ON) -OPTION(ALLOW_OpenBLAS_DOWNLOAD "Allow OpenBLAS to be downloaded locally, if it's not found. It's not necessary, but -it will make lib4neuro faster." ON) - -OPTION(Boost_USE_MULTITHREADED ON) -OPTION(Boost_DEBUG OFF) - -FIND_PACKAGE( - Boost - - COMPONENTS - system - serialization - random -) -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) -IF(NOT EXPRTK_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD) - MESSAGE("Exprt will be downloaded and compiled locally in 'external_dependencies' folder.") - INCLUDE(DownloadExprtk) -ENDIF() -MESSAGE(STATUS EXPRTK_INCLUDE_DIRS: ${EXPRTK_INCLUDE_DIRS}) - -FIND_PACKAGE(Turtle) -IF(NOT TURTLE_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD) - MESSAGE("Turtle will be downloaded and compiled locally in 'external_dependencies' folder.") - INCLUDE(DownloadTurtle) -ENDIF() -MESSAGE(STATUS TURTLE_INCLUDE_DIRS: ${TURTLE_INCLUDE_DIRS}) - -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() - -#----------------------------------------------------------------------------# -# If BLAS or LAPACK are not set up explicitly, use x64 binaries in Armadillo # -# repository (ONLY on Windows) # -#----------------------------------------------------------------------------# -IF(NOT BLAS_DIR AND NOT LAPACK_DIR AND WIN32) - SET(BLAS_LIBRARIES ${ARMADILLO_ROOT}/examples/lib_win64/blas_win64_MT.lib) - SET(LAPACK_LIBRARIES ${ARMADILLO_ROOT}/examples/lib_win64/lapack_win64_MT.lib) -ENDIF() - -#-------------------------------------------------------# -# Look for linear algebra libraries needed by Armadillo # -# (ONLY on Linux systems) # -#-------------------------------------------------------# -IF(NOT WIN32) - FIND_PACKAGE(OpenBLAS) - IF(NOT OpenBLAS_FOUND) - IF(ALLOW_OpenBLAS_DOWNLOAD AND NOT WIN32) - INCLUDE(DownloadOpenBLAS) - ELSE() - FIND_PACKAGE(BLAS) - FIND_PACKAGE(LAPACK) - - IF(NOT BLAS_FOUND AND NOT LAPACKE_FOUND) - MESSAGE(FATAL_ERROR "No BLAS or LAPACK libraries are available!") - ENDIF() - - ENDIF() - ENDIF() -ENDIF() - -#---------------------------------------------------# -# Add subdirectory with source codes to be compiled # -#---------------------------------------------------# -ADD_SUBDIRECTORY(${SRC_DIR}) - -#include(CTest) -#ENABLE_TESTING() -#add_test(NAME constant_neuron_test COMMAND constant_neuron_test) -#add_test(NAME binary_neuron_test COMMAND binary_neuron_test) -#add_test(NAME logistic_neuron_test COMMAND logistic_neuron_test) -##add_test(NAME connectionFunctionGeneral_test COMMAND connectionFunctionGeneral_test) -#add_test(NAME connection_Function_identity_test COMMAND connection_Function_identity_test) -#add_test(NAME neural_network_test COMMAND neural_network_test) -#add_test(NAME dataset_test COMMAND dataset_test) -##add_test(NAME particle_swarm_test COMMAND particle_swarm_test) -##add_test(NAME particle_test COMMAND particle_test) -##add_test(NAME NeuralNetworkSum_test COMMAND NeuralNetworkSum_test) -##add_test(NAME errorfunction_test COMMAND errorfunction_test) -##add_test(NAME DESolver_test COMMAND DESolver_test) -# -#include(CodeCoverage) -#APPEND_COVERAGE_COMPILER_FLAGS() -#SETUP_TARGET_FOR_COVERAGE_LCOV( -# NAME coverage # New target name -# EXECUTABLE ctest -C ${ROOT_DIR}/CTestTestfile.cmake # Executable in PROJECT_BINARY_DIR -# DEPENDENCIES ${Boost_LIBRARIES} # Dependencies to build first -#) +CMAKE_MINIMUM_REQUIRED(VERSION 3.13) + +PROJECT(lib4neuro) + +FIND_PACKAGE(Git PATHS $ENV{GIT_EXEC}) +if(GIT_FOUND) + message("git found: ${GIT_EXECUTABLE}") +endif() + +MESSAGE(STATUS "lib4neuro CMake starting...") +MESSAGE(STATUS "Using CMake ${CMAKE_VERSION}") + +#TODO use 'option' instead of 'set' for boolean variables! + +#---------------# +# DEBUG options # +#---------------# +# Print target dependencies during a configuration phase +# set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_DEBUG_MODE 1) + +# Debug memory errors +#add_compile_options(-fsanitize=address) +#add_link_options(-fsanitize=address -static-libasan) + +# Compile for profiling with GProf +# - binaries need to be run to create gmon.out file and +# 'gprof' command is run subsequently! +#ADD_COMPILE_OPTIONS(-pg) +#ADD_LINK_OPTIONS(-pg) + +#------------------------------------------# +# 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}) + + # Create scripts for setting N_CORES in the parent process + IF(WIN32) + FILE(WRITE set_env_n_cores.bat "set N_CORES=${N_CORES}") + ELSE() + FILE(WRITE set_env_n_cores "export N_CORES=${N_CORES}") + ENDIF() + + SET(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N_CORES}) +ENDIF() +MESSAGE(STATUS "Build can be performed on ${N_CORES} cores.") + +#TODO use just locally, where needed +IF(WIN32) + ADD_COMPILE_DEFINITIONS(BOOST_ALL_NO_LIB NOMINMAX) +ELSE() + ADD_COMPILE_DEFINITIONS(BOOST_TEST_DYN_LINK) +ENDIF() +ADD_COMPILE_DEFINITIONS(ARMA_DONT_USE_WRAPPER) +ADD_COMPILE_DEFINITIONS(BOOST_LIB_DIAGNOSTIC) + +#------------# +# Build type # +#------------# +# Release / None / Debug +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE RELEASE CACHE STRING + "Choose the type of build, options are: None Debug Release." + FORCE) +ELSEIF(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + ADD_COMPILE_DEFINITIONS("L4N_DEBUG") + +ELSEIF(${CMAKE_BUILD_TYPE} STREQUAL "Release") + IF(WIN32) + ADD_COMPILE_DEFINITIONS(_ITERATOR_DEBUG_LEVEL=0) + ENDIF() +ENDIF(NOT CMAKE_BUILD_TYPE) +MESSAGE(STATUS CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}) + +#------------------------# +# Dependencies link type # +#------------------------# +IF(NOT DEPENDENCIES_LINK_TYPE AND NOT ENV{DEPENDENCIES_LINK_TYPE}) + SET(DEPENDENCIES_LINK_TYPE "static") + MESSAGE("DEPENDENCIES_LINK_TYPE is not specified - lib4neuro is going to be linked statically.") +ELSEIF(ENV{DEPENDENCIES_LINK_TYPE}) + SET(DEPENDENCIES_LINK_TYPE ENV{DEPENDENCIES_LINK_TYPE}) +ENDIF() + +#--------------------------------# +# Setting C++ compiler flags # +#--------------------------------# +SET(CMAKE_CXX_STANDARD 17) +SET(BOOST_TOOLSET "") +IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost") + SET(BOOST_TOOLSET --toolset=intel) +ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0 /bigobj") + ADD_COMPILE_OPTIONS("/D _SCL_SECURE_NO_WARNINGS") + ADD_COMPILE_OPTIONS("/D _CRT_SECURE_NO_WARNINGS") + + if("${MSVC_TOOLSET_VERSION}" STREQUAL "140") + SET(BOOST_TOOLSET --toolset=msvc-14.0) + elseif("${MSVC_TOOLSET_VERSION}" STREQUAL "141") + SET(BOOST_TOOLSET --toolset=msvc-15.0) + else() + SET(BOOST_TOOLSET --toolset=msvc) + endif() + +ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MINGW") + SET(BOOST_TOOLSET --toolset=gcc) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mbig-obj") +ELSE() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +ENDIF() + +#--------------------# +# Automatic settings # +#--------------------# +IF(CMAKE_BUILD_TYPE MATCHES DEBUG) + OPTION(CMAKE_VERBOSE_MAKEFILE ON) +ENDIF() + +#------------------------------------------------------------------------------------# +# Check, if the path to the current directory does contain some unallowed characters # +#------------------------------------------------------------------------------------# +STRING(REGEX MATCH "[A-Za-z0-9 \\\\/:_-]*" MATCH ${CMAKE_CURRENT_LIST_DIR}) +IF(NOT ${MATCH} STREQUAL ${CMAKE_CURRENT_LIST_DIR}) + MESSAGE(FATAL_ERROR "Illegal character(s) found in the path to the current directory!") +ENDIF() + +#---------------# +# Set variables # +#---------------# +SET(ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}) +SET(SRC_DIR ${ROOT_DIR}/src) +SET(PROJECT_BINARY_DIR ${ROOT_DIR}/build) + +#----------------------------------------# +# 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 # +#-------------------------# +MESSAGE("Looking for external libraries...") +SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) + +#TODO make downloading dependencies arbitrary +OPTION(ALLOW_DEPENDENCIES_DOWNLOAD "Allow external dependencies to be downloaded locally, if they're not found." ON) +OPTION(ALLOW_OpenBLAS_DOWNLOAD "Allow OpenBLAS to be downloaded locally, if it's not found. It's not necessary, but +it will make lib4neuro faster." ON) + +OPTION(Boost_USE_MULTITHREADED ON) +OPTION(Boost_DEBUG OFF) + +FIND_PACKAGE( + Boost + + COMPONENTS + system + serialization + random +) +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) +IF(NOT EXPRTK_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD) + MESSAGE("Exprt will be downloaded and compiled locally in 'external_dependencies' folder.") + INCLUDE(DownloadExprtk) +ENDIF() +MESSAGE(STATUS EXPRTK_INCLUDE_DIRS: ${EXPRTK_INCLUDE_DIRS}) + +FIND_PACKAGE(Turtle) +IF(NOT TURTLE_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD) + MESSAGE("Turtle will be downloaded and compiled locally in 'external_dependencies' folder.") + INCLUDE(DownloadTurtle) +ENDIF() +MESSAGE(STATUS TURTLE_INCLUDE_DIRS: ${TURTLE_INCLUDE_DIRS}) + +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() + +#----------------------------------------------------------------------------# +# If BLAS or LAPACK are not set up explicitly, use x64 binaries in Armadillo # +# repository (ONLY on Windows) # +#----------------------------------------------------------------------------# +IF(NOT BLAS_DIR AND NOT LAPACK_DIR AND WIN32) + SET(BLAS_LIBRARIES ${ARMADILLO_ROOT}/examples/lib_win64/blas_win64_MT.lib) + SET(LAPACK_LIBRARIES ${ARMADILLO_ROOT}/examples/lib_win64/lapack_win64_MT.lib) +ENDIF() + +#-------------------------------------------------------# +# Look for linear algebra libraries needed by Armadillo # +# (ONLY on Linux systems) # +#-------------------------------------------------------# +IF(NOT WIN32) + FIND_PACKAGE(OpenBLAS) + IF(NOT OpenBLAS_FOUND) + IF(ALLOW_OpenBLAS_DOWNLOAD AND NOT WIN32) + INCLUDE(DownloadOpenBLAS) + ELSE() + FIND_PACKAGE(BLAS) + FIND_PACKAGE(LAPACK) + + IF(NOT BLAS_FOUND AND NOT LAPACKE_FOUND) + MESSAGE(FATAL_ERROR "No BLAS or LAPACK libraries are available!") + ENDIF() + + ENDIF() + ENDIF() +ENDIF() + +#---------------------------------------------------# +# Add subdirectory with source codes to be compiled # +#---------------------------------------------------# +ADD_SUBDIRECTORY(${SRC_DIR}) + +#include(CTest) +#ENABLE_TESTING() +#add_test(NAME constant_neuron_test COMMAND constant_neuron_test) +#add_test(NAME binary_neuron_test COMMAND binary_neuron_test) +#add_test(NAME logistic_neuron_test COMMAND logistic_neuron_test) +##add_test(NAME connectionFunctionGeneral_test COMMAND connectionFunctionGeneral_test) +#add_test(NAME connection_Function_identity_test COMMAND connection_Function_identity_test) +#add_test(NAME neural_network_test COMMAND neural_network_test) +#add_test(NAME dataset_test COMMAND dataset_test) +##add_test(NAME particle_swarm_test COMMAND particle_swarm_test) +##add_test(NAME particle_test COMMAND particle_test) +##add_test(NAME NeuralNetworkSum_test COMMAND NeuralNetworkSum_test) +##add_test(NAME errorfunction_test COMMAND errorfunction_test) +##add_test(NAME DESolver_test COMMAND DESolver_test) +# +#include(CodeCoverage) +#APPEND_COVERAGE_COMPILER_FLAGS() +#SETUP_TARGET_FOR_COVERAGE_LCOV( +# NAME coverage # New target name +# EXECUTABLE ctest -C ${ROOT_DIR}/CTestTestfile.cmake # Executable in PROJECT_BINARY_DIR +# DEPENDENCIES ${Boost_LIBRARIES} # Dependencies to build first +#) diff --git a/build_scripts/compile_anselm.sh b/build_scripts/compile_anselm.sh old mode 100644 new mode 100755 diff --git a/build_scripts/linux/linux_gcc_build_x64_release_local.sh b/build_scripts/linux/linux_gcc_build_x64_release_local.sh index 9b03dca80f4a861b298d48ed1ad1eda3cb9678d7..7154b57de7a084b3f2328b2cb62afe72f65719ae 100755 --- a/build_scripts/linux/linux_gcc_build_x64_release_local.sh +++ b/build_scripts/linux/linux_gcc_build_x64_release_local.sh @@ -110,7 +110,7 @@ then echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Release${NC} (preparing makefiles)" - cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -S . -B build || { echo -e "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; } + cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -S . -B build || { echo -e "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; } if [ ${BUILD_ERROR_OCCURED} = "0" ] then echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Release${NC} (building)" diff --git a/src/examples/acsf2.cpp b/src/examples/acsf2.cpp index f1de632b2f31aac49312441cae7f056014e5e949..2c8c830cc538d363ba50657a1c05414e59fb09d0 100644 --- a/src/examples/acsf2.cpp +++ b/src/examples/acsf2.cpp @@ -95,7 +95,7 @@ int main() { elements[l4n::ELEMENT_SYMBOL::He] = &helium; /* Read data */ - l4n::XYZReader reader("/home/martin/Desktop/HE21+T1.xyz"); + l4n::XYZReader reader("/home/kra568/lib4neuro/HE21+T0.xyz"); reader.read(); std::cout << "Finished reading data" << std::endl;