Skip to content
Snippets Groups Projects

Draft: adding cpp version of codes

Open Pradipta Samanta requested to merge feature-add-cpp-codes into main
4 files
+ 190
0
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -13,6 +13,7 @@ add_library(
iconmath-interpolation
mo_lib_interpolation_scalar.F90
mo_lib_interpolation_vector.F90
mo_lib_interpolation_vector.cpp
mo_lib_intp_rbf.F90)
add_library(${PROJECT_NAME}::interpolation ALIAS iconmath-interpolation)
@@ -55,10 +56,20 @@ target_include_directories(
$<INSTALL_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>>
# Path to internal include directory
$<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:${PROJECT_SOURCE_DIR}/include>>
# Path to the internal C/C++ headers (for testing): Requires CMake 3.15+ for
# multiple compile languages
# https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html
$<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:C,CXX>:${CMAKE_CURRENT_SOURCE_DIR}>>
PRIVATE
# Path to config.h (for C and C++ only): Requires CMake 3.15+ for multiple
# compile languages
# https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html
$<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:C,CXX>:${CMAKE_CURRENT_BINARY_DIR}>>
)
target_link_libraries(iconmath-interpolation PUBLIC fortran-support::fortran-support)
target_link_libraries(iconmath-interpolation PUBLIC iconmath-support)
target_link_libraries(iconmath-interpolation PRIVATE Kokkos::kokkos)
install(TARGETS iconmath-interpolation EXPORT "${PROJECT_NAME}-targets")
Loading