From 9d320315527686eb1d1635246737058ae144a354 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 29 Nov 2021 14:43:40 +0100 Subject: [PATCH] Include the tests after loading MPI --- CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ef7350..ba5f717 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,14 +49,6 @@ else() message(WARNING "IPO is not supported, expect performance penalty\n${error}") endif() -if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - include(CTest) - - if(BUILD_TESTING) - add_subdirectory(test) - endif() -endif() - # Extra build type for AddressSanitizer (Asan) set(CMAKE_C_FLAGS_ASAN "${CMAKE_C_FLAGS_DEBUG} \ -fsanitize=address \ @@ -122,6 +114,14 @@ find_package(MPI REQUIRED) add_executable(ovnisync ovnisync.c) target_link_libraries(ovnisync m MPI::MPI_C) +if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) + include(CTest) + + if(BUILD_TESTING) + add_subdirectory(test) + endif() +endif() + install(TARGETS ovni LIBRARY DESTINATION lib) install(TARGETS ovniemu ovnidump ovni2prv ovnisync ovnisort RUNTIME DESTINATION bin) install(FILES ovni.h DESTINATION include)