Skip to content

Commit

Permalink
improve guards
Browse files Browse the repository at this point in the history
  • Loading branch information
artv3 committed Dec 26, 2024
1 parent 019bd0c commit 79689e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,10 @@ endif ()

set (raja_depends)

if (DEFINED caliper_DIR)

if (RAJA_ENABLE_CALIPER)
set (raja_depends
${raja_depends}
caliper)

find_package(caliper REQUIRED
NO_DEFAULT_PATH
PATHS ${caliper_DIR}
Expand Down
10 changes: 6 additions & 4 deletions examples/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
# SPDX-License-Identifier: (BSD-3-Clause)
################################################################################

raja_add_executable(
NAME raja-caliper
SOURCES raja-caliper.cpp caliper-plugin.cpp)
if(RAJA_ENABLE_CALIPER)
raja_add_executable(
NAME raja-caliper
SOURCES raja-caliper.cpp caliper-plugin.cpp)
endif()

raja_add_executable(
NAME plugin-example
Expand All @@ -17,7 +19,7 @@ if (RAJA_ENABLE_RUNTIME_PLUGINS)
raja_add_executable(
NAME plugin-example-dynamic
SOURCES test-plugin-dynamic.cpp)

raja_add_plugin_library(NAME timer_plugin
SHARED TRUE
SOURCES timer-plugin.cpp)
Expand Down
2 changes: 0 additions & 2 deletions examples/plugin/raja-caliper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ int main(int RAJA_UNUSED_ARG(argc), char **RAJA_UNUSED_ARG(argv[]))
std::cout << "\n Running RAJA sequential daxpy...\n";

std::memcpy( a, a0, N * sizeof(double) );
#if 1
{
timer.reset();
timer.start();
Expand All @@ -123,7 +122,6 @@ int main(int RAJA_UNUSED_ARG(argc), char **RAJA_UNUSED_ARG(argv[]))
RAJA::Timer::ElapsedType etime = timer.elapsed();
std::cout << "C-version elapsed time : " << etime << " seconds" << std::endl;
}
#endif
checkResult(a, aref, N);
//printResult(a, N);

Expand Down

0 comments on commit 79689e0

Please sign in to comment.