Skip to content

Commit

Permalink
wrap up test compilation with an ENABLE_TESTS option
Browse files Browse the repository at this point in the history
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
  • Loading branch information
koomie committed Jun 3, 2024
1 parent 085d07d commit a6998e1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit a6998e1

Please sign in to comment.