Skip to content

Commit

Permalink
Refs #20176: Require CMake minimum version 3.22 only for tests
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
  • Loading branch information
JesusPoderoso committed Jan 9, 2024
1 parent ce663b9 commit e60ab46
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ endif(WIN32)
# Testing
###############################################################################
if(EPROSIMA_BUILD_TESTS)
cmake_minimum_required(VERSION 3.22)
find_package(GTest CONFIG REQUIRED)
include(${PROJECT_SOURCE_DIR}/cmake/testing/GoogleTest.cmake)

Expand All @@ -59,23 +60,26 @@ endif()
# Profiling tests using valgrind
###############################################################################
if(NOT ((MSVC OR MSVC_IDE)) AND PROFILING_TESTS)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
if(CTEST_MEMORYCHECK_COMMAND)
add_subdirectory(profiling)
endif()
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
if(CTEST_MEMORYCHECK_COMMAND)
cmake_minimum_required(VERSION 3.22)
add_subdirectory(profiling)
endif()
endif()

###############################################################################
# Performance tests
###############################################################################
if(PERFORMANCE_TESTS)
cmake_minimum_required(VERSION 3.22)
add_subdirectory(performance)
endif()

###############################################################################
# System tests
###############################################################################
if(SYSTEM_TESTS)
cmake_minimum_required(VERSION 3.22)
add_subdirectory(system/tools/fastdds)
add_subdirectory(system/tools/fds)
endif()
Expand Down

0 comments on commit e60ab46

Please sign in to comment.