diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ad68e4242a8014cccea65e34e9168dd0dae6fd8..15ea0144e1860d88c8d9b87ba0464dfb46a92df0 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 b228fe0f1c58416dbad41302c30b938fff7abea3..cafc9d720f2c6d2d8412d004c9565cf9720cf23b 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})