Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move target logic into test cmakelist #53

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ cmake_minimum_required(VERSION 3.14)
set(PORTS_OF_CALL_VERSION 1.6.0)
project(ports-of-call VERSION ${PORTS_OF_CALL_VERSION})

# dependent options
include(CMakeDependentOption)

Yurlungur marked this conversation as resolved.
Show resolved Hide resolved
# CMAKE WARMUP
# ----------------------------------------

Expand All @@ -32,6 +35,10 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif()

option (PORTS_OF_CALL_BUILD_TESTING "Test the current installation")
# off by default but possible to turn on
cmake_dependent_option(PORTS_OF_CALL_TEST_USE_KOKKOS
"Use Kokkos offloading for tests"
OFF "PORTS_OF_CALL_BUILD_TESTING" OFF)
rbberger marked this conversation as resolved.
Show resolved Hide resolved

# CONFIGURATION LOGIC
# ----------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()
# this interface target is to collect
# compile/link options for the test
add_library(portsofcall_iface INTERFACE)
if (PORTABILITY_STRATEGY_KOKKOS)
if (PORTS_OF_CALL_TEST_USE_KOKKOS)
if(NOT TARGET Kokkos::kokkos)
find_package(Kokkos REQUIRED)
endif()
Expand Down
Loading