wrap up test compilation with an ENABLE_TESTS option

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Этот коммит содержится в:
Karl W Schulz
2024-06-03 11:36:01 -05:00
коммит произвёл Cole Ramos
родитель 5077f9e24f
Коммит 90ff4bf575
+9 -4
Просмотреть файл
@@ -27,12 +27,10 @@ string(REGEX REPLACE "([0-9]+)\.([0-9]+)\.([0-9]+)(.*)" "\\1.\\2.\\3" OMNIPERF_V
project(
omniperf
VERSION ${OMNIPERF_VERSION}
LANGUAGES HIP
LANGUAGES C
DESCRIPTION "OmniPerf"
HOMEPAGE_URL "https://github.com/ROCm/omniperf")
set(CMAKE_HIP_FLAGS_RELEASE "-O2")
include(ExternalProject)
include(GNUInstallDirs)
@@ -158,7 +156,14 @@ if(${GIT_CLONE})
endif()
# Setup testing collateral
add_subdirectory(tests)
option(ENABLE_TESTS "Enable compilation of testing collateral" OFF)
if(${ENABLE_TESTS})
enable_language("C" "HIP")
add_subdirectory(tests)
set(CMAKE_HIP_FLAGS_RELEASE "-O2")
endif()
message(STATUS "Enable tests compilation: ${ENABLE_TESTS}")
enable_testing()