Commit feb50b11 authored by Martin Beseda's avatar Martin Beseda

Merge branch 'tmp' into dev

parents 9a50c603 35852fe6
@echo off
rem call VsDevCmd.bat
title Build lib4neuro project
rem Build type (Release/Debug)
set BUILD_TYPE=Debug
rem Should we rebuild BOOST? (yes/no)
set REBUILD_BOOST=yes
rem Should we build the examples? (yes/no)
set BUILD_EXAMPLES=yes
rem Should we build the unit-tests? (yes/no)
set BUILD_TESTS=yes
rem Should we build the lib4neuro library? (yes)
set BUILD_LIB=yes
rem C++ compiler
set CXX_COMPILER=cl
set C_COMPILER=cl
rem Makefile generator
rem For the complete list type "cmake --help"
rem Example: "MSYS Makefiles", "MinGW Makefiles", "NMake Makefiles"
set MAKEFILE_GENERATOR="Visual Studio 15 2017 Win64"
call clean.bat
cmake -G %MAKEFILE_GENERATOR% -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -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 .
cmake --build . --config %BUILD_TYPE% && (echo (Build complete.); echo (For examples have a look at the folder build/examples.)) || (echo "Build finished with errors!")
#!/bin/sh
#------------#------------------------------------------------------------
# Parameters #
#------------#
#
# Modular build parameters
#
BUILD_TESTS=yes
BUILD_EXAMPLES=yes
BUILD_LIB=yes
# Build type (Release/Debug)
BUILD_TYPE=Debug
# C++ compiler
CXX_COMPILER=g++
C_COMPILER=gcc
if [ -z "$BUILD_TYPE" ] || [ -z "$CXX_COMPILER" ]; then
(>&2 echo "Set, please, both BUILD_TYPE and CXX_COMPILER variables in the 'build.sh' script.")
exit 2
fi
$(pwd)/clean.sh
#
# For ExprTk download
#
git submodule init
git submodule update --remote
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DLIB4NEURO_DIR=$(pwd)/build/lib .
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;)
@echo off
rmdir /s /q build 2>NUL
del Makefile 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 CMakeCache.txt 2>NUL
del 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
#!/bin/bash
rm -rf build
rm -rf Makefile
rm -rf docs/*
rm -f src/*TestRunner*
rm -f src/*.o src/*.mod
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment