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

Use the options ENABLE_PERFTEST, ENABLE_EXAMPLES #1667

Merged
merged 3 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 19 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ IF (NOT KOKKOSKERNELS_HAS_TRILINOS)
)
KOKKOSKERNELS_ADD_OPTION(
"ENABLE_PERFTESTS"
ON
OFF
BOOL
"Whether to build performance tests. Default: OFF"
)
Expand Down Expand Up @@ -383,9 +383,24 @@ ELSE()
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(sparse/unit_test)
ENDIF()
IF (KokkosKernels_ENABLE_ALL_COMPONENTS)
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(perf_test)
KOKKOSKERNELS_ADD_EXAMPLE_DIRECTORIES(example)
ENDIF()
IF (KokkosKernels_ENABLE_PERFTESTS)
MESSAGE(STATUS "Enabling perf tests.")
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(perf_test)
ENDIF ()
IF (KokkosKernels_ENABLE_EXAMPLES)
MESSAGE(STATUS "Enabling examples.")
KOKKOSKERNELS_ADD_EXAMPLE_DIRECTORIES(example)
ENDIF ()
ELSE ()
# ENABLE_ALL_COMPONENTS is OFF, so perftests and examples can't be enabled.
# Warn if they were requested.
IF (KokkosKernels_ENABLE_PERFTESTS)
MESSAGE(WARNING "Could not enable perf tests because KokkosKernels_ENABLE_ALL_COMPONENTS=OFF")
ENDIF ()
IF (KokkosKernels_ENABLE_EXAMPLES)
MESSAGE(WARNING "Could not enable examples because KokkosKernels_ENABLE_ALL_COMPONENTS=OFF")
ENDIF ()
ENDIF ()

KOKKOSKERNELS_PACKAGE_POSTPROCESS()
IF (KokkosKernels_ENABLE_DOCS)
Expand Down
2 changes: 1 addition & 1 deletion perf_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (KokkosKernels_ENABLE_PERFTESTS)

KOKKOSKERNELS_INCLUDE_DIRECTORIES(sparse)

if(Kokkos_ENABLE_TESTS_AND_PERFSUITE)
if(KokkosKernels_ENABLE_TESTS_AND_PERFSUITE)
#Add RPS implementations of KK perf tests here
KOKKOSKERNELS_ADD_EXECUTABLE(
tracked_testing
Expand Down