Include the tests after loading MPI

This commit is contained in:
Rodrigo Arias 2021-11-29 14:43:40 +01:00
parent 4dc3b6116e
commit 9d32031552

View File

@ -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)