diff --git a/CMakeLists.txt b/CMakeLists.txt index d92749a9f9..6b5e06c97a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,6 +178,23 @@ macro(opm-simulators_config_hook) endmacro() macro(opm-simulators_tests_hook) + include(${CMAKE_CURRENT_SOURCE_DIR}/modelTests.cmake) + + # Look for the opm-tests repository; if found the variable + # HAVE_OPM_TESTS will be set to true. + include(Findopm-tests) + + if (HAVE_OPM_TESTS) + include(${CMAKE_CURRENT_SOURCE_DIR}/compareECLFiles.cmake) + endif() + + if(MPI_FOUND) + include(${CMAKE_CURRENT_SOURCE_DIR}/parallelUnitTests.cmake) + endif() + + if(OPM_ENABLE_PYTHON) + include(${CMAKE_CURRENT_SOURCE_DIR}/pythonIntegrationTests.cmake) + endif() endmacro() macro(opm-simulators_targets_hook) @@ -330,10 +347,6 @@ endif() # the build starts, so it makes sense to keep the data there then. include (OpmInit) -# Look for the opm-tests repository; if found the variable -# HAVE_OPM_TESTS will be set to true. -include(Findopm-tests) - # list of prerequisites for this particular project; this is in a # separate file (in cmake/Modules sub-directory) because it is shared # with the find module @@ -497,11 +510,7 @@ if(MPI_FOUND) target_sources(test_chopstep PRIVATE $) endif() -include (${CMAKE_CURRENT_SOURCE_DIR}/modelTests.cmake) - if (HAVE_OPM_TESTS) - include (${CMAKE_CURRENT_SOURCE_DIR}/compareECLFiles.cmake) - if(OPM_ENABLE_PYTHON) if(${CMAKE_BINARY_DIR} STREQUAL ${PROJECT_BINARY_DIR}) set(sim_dir ${CMAKE_BINARY_DIR}) @@ -516,14 +525,6 @@ if (HAVE_OPM_TESTS) endif() endif() -if(MPI_FOUND) - include (${CMAKE_CURRENT_SOURCE_DIR}/parallelUnitTests.cmake) -endif() - -if(OPM_ENABLE_PYTHON) - include (${CMAKE_CURRENT_SOURCE_DIR}/pythonIntegrationTests.cmake) -endif() - include(OpmBashCompletion) if (NOT BUILD_FLOW)