Commit 73c2beb3 authored by Martin Mrovec's avatar Martin Mrovec

SYN: Modification of the Eclipse project

parent 2047a4fb
*.o
*.mod
*.out
/Debug/
......@@ -2,8 +2,8 @@ before_script:
- apt-get update
- apt-get install -y -qq make gfortran cmake gem
- gem install funit
- export FC="gfortran"
- ./build.sh
run_tests:
script: "./run_tests.sh"
......@@ -6,7 +6,7 @@ enable_language(Fortran)
# Default installation location #
#-------------------------------#
# Linux: /usr/local
# Windows: c:/Program Files
# Windows: C:/Users/Marti/OneDrive/Dokumenty/Fortran/git4Neuro/4NeuroMrovma/4Neuro/t
#------------#
# Build type #
......@@ -26,37 +26,27 @@ endif (NOT CMAKE_BUILD_TYPE)
# funroll-all-loops a bez prepinace
set(standard "-std=f2008")
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
if (WITH_TIME_PROFILING)
add_definitions(-DTIME_PROFILING)
endif()
message ("Fortran compiler name: " ${Fortran_COMPILER_NAME})
message ("CMAKE_Fortran_COMPILER full path: " ${CMAKE_Fortran_COMPILER})
message ("Fortran compiler: " ${Fortran_COMPILER_NAME})
message ("Build type:" ${CMAKE_BUILD_TYPE})
if (Fortran_COMPILER_NAME MATCHES "gfortran.*")
# gfortran
set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-loops -fno-f2c -O3 ${standard} -cpp")
set (CMAKE_Fortran_FLAGS_DEBUG "-fno-f2c -O0 -g ${standard} -cpp")
set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-loops -fno-f2c -O3 ${standard}")
set (CMAKE_Fortran_FLAGS_DEBUG "-fno-f2c -O0 -g ${standard}")
elseif (Fortran_COMPILER_NAME MATCHES "ifort.*")
# ifort (untested)
set (CMAKE_Fortran_FLAGS_RELEASE "-f77rtl -O3 ${standard} -cpp")
set (CMAKE_Fortran_FLAGS_DEBUG "-f77rtl -O0 -g ${standard} -cpp")
set (CMAKE_Fortran_FLAGS_RELEASE "-f77rtl -O3 ${standard}")
set (CMAKE_Fortran_FLAGS_DEBUG "-f77rtl -O0 -g ${standard}")
elseif (Fortran_COMPILER_NAME MATCHES "g77")
# g77
set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-loops -fno-f2c -O3 -m32 ${standard} -cpp")
set (CMAKE_Fortran_FLAGS_DEBUG "-fno-f2c -O0 -g -m32 ${standard} -cpp")
set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-loops -fno-f2c -O3 -m32 ${standard}")
set (CMAKE_Fortran_FLAGS_DEBUG "-fno-f2c -O0 -g -m32 ${standard}")
else (Fortran_COMPILER_NAME MATCHES "gfortran.*")
message ("CMAKE_Fortran_COMPILER full path: " ${CMAKE_Fortran_COMPILER})
message ("Fortran compiler: " ${Fortran_COMPILER_NAME})
message ("No optimized Fortran compiler flags are known, we just try -O2...")
set (CMAKE_Fortran_FLAGS_RELEASE "-O2 ${standard} -cpp")
set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g ${standard} -cpp")
set (CMAKE_Fortran_FLAGS_RELEASE "-O2 ${standard}")
set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g ${standard}")
endif (Fortran_COMPILER_NAME MATCHES "gfortran.*")
#(Fortran_COMPILER_NAME MATCHES "gfortran.*")
#----------------#
# User variables #
#----------------#
......
#!/bin/bash
#------------#------------------------------------------------------------
# Parameters #
#------------#
# Build type (Release/Debug)
BUILD_TYPE=Debug
# Turn of/off time profiling (1/0)
WITH_TIME_PROFILING=0
#-------------------------------------------------------------------------
echo "Creating folder 'build'...";
mkdir -p build/lib;
echo "Folder 'build' was created'";
cd build;
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DWITH_TIME_PROFILING:BOOLEAN=${WITH_TIME_PROFILING} ..
make VERBOSE=1 && echo "Build complete." || exit -1;
cmake ..;
make && echo "Installation complete." || exit -1;
#make install;
......@@ -3,4 +3,4 @@
cd build;
./connection_test.out
funit connection_m
\ No newline at end of file
funit connection_m
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