WSL/SLF GitLab Repository

Commit 7841d7f3 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Code cleanup, removing some unecessary stuff for CTest

parent 754ee886
......@@ -407,27 +407,20 @@ INCLUDE(CPack)
###########################################################
## CTest section
###########################################################
## Special build type configuration for Covarage Testing.
# Attantion: Coverage testing right now only works with g++ (or comercial tools)
## Add the tests itselfs
OPTION(BUILD_TESTING "Build the tests" OFF)
IF(BUILD_TESTING)
# Coverage statistic rign now only supportet with GCC (GNUGXX)
# Special build type configuration for Coverage Testing.
#Coverage testing only supported by GCC and a few commercial tools
IF(CMAKE_COMPILER_IS_GNUCXX)
OPTION(BUILD_TESTING_WITH_COVERAGE "Use gcc flags to make coverage tests" OFF)
IF(BUILD_TESTING_WITH_COVERAGE)
# force the correct flags to make coverage trought a build type
SET(CMAKE_BUILD_TYPE coverage)
SET(CMAKE_CXX_FLAGS_COVERAGE "-Wall -O0 -ftest-coverage -fprofile-arcs" CACHE STRING "" FORCE)
MARK_AS_ADVANCED(FORCE CMAKE_CXX_FLAGS_COVERAGE)
# Force debug mode, so that no optimisation is made to get "Correct" results of coverage testing
SET(CMAKE_BUILD_TYPE "coverage" CACHE STRING "Choose the type of build, options are: debug release coverage " FORCE)
SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
ENDIF(BUILD_TESTING_WITH_COVERAGE)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
......
......@@ -346,16 +346,10 @@ template<class T> void Array2D<T>::fill(const Array2D<T>& i_array2D, const size_
}
template<class T> Array2D<T>::Array2D(const size_t& anx, const size_t& any, const T& init) :
vecData(anx*any, init), nx(anx), ny(any), keep_nodata(true)
{
//resize(anx,any,init);
}
vecData(anx*any, init), nx(anx), ny(any), keep_nodata(true) {}
template<class T> Array2D<T>::Array2D(const size_t& anx, const size_t& any) :
vecData(anx*any), nx(anx), ny(any), keep_nodata(true)
{
//resize(anx,any);
}
vecData(anx*any), nx(anx), ny(any), keep_nodata(true) {}
template<class T> void Array2D<T>::setKeepNodata(const bool i_keep_nodata) {
keep_nodata = i_keep_nodata;
......
## REALY ??? somthing about old/new format of command error, not get it why....
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
#############################
## Global Configuration ##
#############################
# set Memory check command, more flags possible to be set
# set Memory check command
set(CTEST_MEMORYCHECK_COMMAND valgrind)
#get all include flags needed to make executables
SET(SHAREDNAME ${PROJECT_NAME})
SET(LIBRARIES ${SHAREDNAME} ${CMAKE_DL_LIBS})
# go back to the source dir to have all .h files, same tree/structure as would be installed
# go back to the source dir to have all .h files as would be installed
INCLUDE_DIRECTORIES(..)
###################
## Add Tests ##
###################
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# To group test (for local run test or script) there are two possibelities
# 1. Use "ctest -R RecEx" where RecEx is a regular expretion matching the name
# 2. Group Test on Labels wiht Set Properties and run "ctest -L LabelName"
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ADD_SUBDIRECTORY(meteo_reading_interpol)
ADD_SUBDIRECTORY(meteo_reading_no_interpol)
ADD_SUBDIRECTORY(sun)
......
Supports Markdown
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