From 7e60e17df8bdcc42b1b59725f92512cc737d8f6a Mon Sep 17 00:00:00 2001 From: Nathalie Furmento <nathalie.furmento@labri.fr> Date: Wed, 5 Feb 2020 14:40:09 +0100 Subject: [PATCH] do not disable new-testing when simulation is enabled --- CMakeLists.txt | 18 +++++++----------- new-testing/CMakeLists.txt | 11 ++++++----- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ad68e424..15ea0144e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # # @copyright 2009-2014 The University of Tennessee and The University of # Tennessee Research Foundation. All rights reserved. -# @copyright 2012-2019 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, +# @copyright 2012-2020 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, # Univ. Bordeaux. All rights reserved. # ### @@ -501,13 +501,6 @@ else (NOT CHAMELEON_SIMULATION) set(CHAMELEON_ENABLE_EXAMPLE OFF) message("-- ${BoldBlue}CHAMELEON_ENABLE_EXAMPLE is set to ON but we turn it OFF.") endif () - if (CHAMELEON_ENABLE_TESTING) - set(CHAMELEON_ENABLE_TESTING OFF) - message("-- ${BoldBlue}CHAMELEON_ENABLE_TESTING is set to ON but we turn it OFF." - "\n Because we are compiling the simulation mode (CHAMELEON_SIMULATION=ON)," - "\n there is no sense in compiling testing drivers that are used to check" - "\n numerical correctness of algorithms and kernels.${ColourReset}") - endif () # Simulation mode: we depend on SimGrid find_package(SIMGRID REQUIRED) @@ -995,10 +988,13 @@ if(CHAMELEON_ENABLE_EXAMPLE AND NOT CHAMELEON_SIMULATION) endif(CHAMELEON_ENABLE_EXAMPLE AND NOT CHAMELEON_SIMULATION) # Testing executables -if(CHAMELEON_ENABLE_TESTING AND NOT CHAMELEON_SIMULATION) - add_subdirectory(testing) +if(CHAMELEON_ENABLE_TESTING) add_subdirectory(new-testing) -endif(CHAMELEON_ENABLE_TESTING AND NOT CHAMELEON_SIMULATION) +endif(CHAMELEON_ENABLE_TESTING) + +if(CHAMELEON_ENABLE_EXAMPLE AND NOT CHAMELEON_SIMULATION) + add_subdirectory(testing) +endif(CHAMELEON_ENABLE_EXAMPLE AND NOT CHAMELEON_SIMULATION) # Timing executables if(CHAMELEON_ENABLE_TIMING) diff --git a/new-testing/CMakeLists.txt b/new-testing/CMakeLists.txt index b228fe0f1..cafc9d720 100644 --- a/new-testing/CMakeLists.txt +++ b/new-testing/CMakeLists.txt @@ -4,7 +4,7 @@ # # @copyright 2009-2014 The University of Tennessee and The University of # Tennessee Research Foundation. All rights reserved. -# @copyright 2012-2019 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, +# @copyright 2012-2020 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, # Univ. Bordeaux. All rights reserved. # ### @@ -25,9 +25,6 @@ # @date 2014-11-16 # ### -if (CHAMELEON_SIMULATION) - message(ERROR "new-testing directory should not be included when simulation is enabled") -endif() # Generate chameleon auxiliary testing sources for all possible precisions # -------------------------------------------------------------------- @@ -128,10 +125,14 @@ foreach(_precision ${CHAMELEON_PRECISION} ) ) add_dependencies(${_precision}new-testing chameleon_include - coreblas_include control_include new-testing_include ) +if(NOT CHAMELEON_SIMULATION) + add_dependencies(${_precision}new-testing + coreblas_include + ) +endif(NOT CHAMELEON_SIMULATION) set_property(TARGET ${_precision}new-testing PROPERTY LINKER_LANGUAGE Fortran) target_link_libraries(${_precision}new-testing ${libs_for_tests}) -- GitLab