Skip to content

Commit 90a93cd

Browse files
author
Felix Schurk
committed
resolve import problem of Catalyst 2.0 API
In order to link against catalyst::catalyst, the find_package needs to provide the GLOBAL keyword. Then linkage, is working as well as the headers are found properly. However the GLOBAL keyword is only available by CMake>=3.24 therefore also the bump up in the cmake_minimum_required.
1 parent dec963d commit 90a93cd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 3.1)
1+
cmake_minimum_required (VERSION 3.24)
22
project (IPPL LANGUAGES C CXX)
33
set (IPPL_VERSION_MAJOR 3)
44
set (IPPL_VERSION_MINOR 0.1)
@@ -91,7 +91,7 @@ option(ENABLE_CATALYST "Build example with Catalyst enabled" ON)
9191
if (ENABLE_CATALYST)
9292
get_property(importTargets DIRECTORY "${CMAKE_SOURCE_DIR}" PROPERTY IMPORTED_TARGETS)
9393

94-
find_package(catalyst 2.0 REQUIRED)
94+
find_package(catalyst 2.0 GLOBAL REQUIRED)
9595

9696
cmake_print_properties(
9797
TARGETS catalyst::catalyst

alpine/ChargedParticles.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
//
1818

1919
#include "Ippl.h"
20-
#include <catalyst-2.0/catalyst.hpp>
20+
#include <catalyst.hpp>
2121

2222
#include "Solver/ElectrostaticsCG.h"
2323
#include "Solver/FFTPeriodicPoissonSolver.h"

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ include_directories (
9595
9696
add_library ( ippl ${IPPL_SRCS} ${IPPL_SRCS_FORT} )
9797
98-
target_link_libraries(ippl PUBLIC Kokkos::kokkos ${HEFFTE_LIBRARY} catalyst)
98+
target_link_libraries(ippl PUBLIC Kokkos::kokkos ${HEFFTE_LIBRARY} catalyst::catalyst)
9999
100100
install (TARGETS ippl DESTINATION lib)
101101
install (FILES ${IPPL_BASEDIR_HDRS} DESTINATION include)

0 commit comments

Comments
 (0)