ghex-org / GHEX

Generic exascale-ready library for halo-exchange operations on variety of grids/meshes
Other
8 stars 14 forks source link

CTest dashboard integration and config #85

Closed pycicle closed 4 years ago

biddisco commented 4 years ago

If possible, please merge this small PR quickly, once this is in, then I can enable CDash dashboard testing for the main GridTools/GHEX project at https://cdash.cscs.ch/index.php?project=GHEX - which is currently testing only PRs on my fork of the repo.

biddisco commented 4 years ago

The existing enable_testing sets up things(commands) like add_test and suchlike for testing. The only real addition here is the include(CTest) which also loads support for CDash submissions using the settings in the config file supplied - the catch is that include(CTest) actually calls enable_testing which adds the BUILD_TESTING cmake flag, so really you could remove the enable_testing - but you couldn't use

if(BUILD_TESTING)
  include(CTest) # this internally calls enable_testing()
endif()

because the BUILD_TESTING doesn't exist until the include is included.

enable_testing()
if(BUILD_TESTING)
  include(CTest) # this internally calls enable_testing()
endif()

works, but the overhead of CTest is not worth the extra if block to be honest and everyone just uses

enable_testing()
include(CTest)

even though

include(CTest)

is enough.