Files
DRAMSys/tests/CMakeLists.txt
Derek Christ c3eb5e6a62 Hide the use of FetchContent behind a flag
FetchContent is now disabled by default, when the project is included as
an subproject by another top-level project.
Also, every usage of FetchContent is behind a separate flag to enable and
disable the usage with granular control.
2024-12-20 17:40:15 +01:00

26 lines
699 B
CMake

include(GoogleTest)
set(DRAMSYS_TEST_RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
option(DRAMSYS_USE_FETCH_CONTENT_GTEST "Enable FetchContent to provide gtest" ${DRAMSYS_USE_FETCH_CONTENT})
if (DRAMSYS_USE_FETCH_CONTENT)
if (DRAMSYS_USE_FETCH_CONTENT_GTEST)
FetchContent_Declare(
GTest
GIT_REPOSITORY https://github.com/google/googletest
GIT_TAG release-1.12.1
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(GTest)
endif()
endif()
find_package(GTest REQUIRED)
add_subdirectory(tests_configuration)
add_subdirectory(tests_dramsys)
add_subdirectory(tests_regression)
add_subdirectory(tests_simulator)