WSL/SLF GitLab Repository
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
snow-models
meteoio
Commits
7841d7f3
Commit
7841d7f3
authored
Jan 29, 2016
by
Mathias Bavay
Browse files
Code cleanup, removing some unecessary stuff for CTest
parent
754ee886
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
7841d7f3
...
...
@@ -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
)
...
...
meteoio/dataClasses/Array2D.h
View file @
7841d7f3
...
...
@@ -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
;
...
...
tests/CMakeLists.txt
View file @
7841d7f3
## 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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment