Skip to content
Open
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
1 change: 1 addition & 0 deletions examples/external-usage-example/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <iostream>
#include <pcms/utility/print.h>
#include <pcms/create_field.h>

int main()
{
Expand Down
29 changes: 21 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,28 @@ set(
pcms/field_communicator.h
pcms/field_communicator2.h
pcms/field_evaluation_methods.h
pcms/field_layout_communicator.h
pcms/partition.h
pcms/coupler.h
pcms/coordinate_system.h
pcms/field_layout.h
pcms/adapter/point_cloud/point_cloud_layout.h
pcms/adapter/point_cloud/point_cloud.h
pcms/adapter/omega_h/omega_h_field_layout.h
pcms/adapter/omega_h/omega_h_field2.h
)

set(
PCMS_SOURCES
pcms.cpp
pcms/create_field.cpp
pcms/adapter/xgc/xgc_field_adapter.h
pcms/adapter/point_cloud/point_cloud_layout.cpp
pcms/adapter/point_cloud/point_cloud.cpp
pcms/adapter/omega_h/omega_h_field_layout.cpp
pcms/adapter/omega_h/omega_h_field2.cpp
)
set(
ADAPTER_HEADERS
pcms/adapter/point_cloud/point_cloud_layout.h
pcms/adapter/point_cloud/point_cloud.h
pcms/adapter/omega_h/omega_h_field_layout.h
pcms/adapter/omega_h/omega_h_field2.h
pcms/adapter/xgc/xgc_field_adapter.h
)

Expand All @@ -39,10 +42,9 @@ list(APPEND PCMS_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/pcms/version.h ${CMAKE_CURR

add_subdirectory(pcms/utility)


if(PCMS_ENABLE_XGC)
list(APPEND PCMS_SOURCES pcms/adapter/xgc/xgc_reverse_classification.cpp)
list(APPEND PCMS_HEADERS pcms/adapter/xgc/xgc_reverse_classification.h)
list(APPEND ADAPTER_HEADERS pcms/adapter/xgc/xgc_reverse_classification.h)
endif()
if(PCMS_ENABLE_OMEGA_H)
list(APPEND PCMS_SOURCES
Expand All @@ -53,11 +55,13 @@ if(PCMS_ENABLE_OMEGA_H)
list(
APPEND
PCMS_HEADERS
pcms/adapter/omega_h/omega_h_field.h
pcms/transfer_field.h
pcms/transfer_field2.h
pcms/uniform_grid.h
pcms/point_search.h
)
list(APPEND ADAPTER_HEADERS
pcms/adapter/omega_h/omega_h_field.h
pcms/adapter/uniform_grid/uniform_grid_field_layout.h
pcms/adapter/uniform_grid/uniform_grid_field.h
)
Expand Down Expand Up @@ -96,6 +100,11 @@ target_include_directories(
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
target_sources(pcms_core PUBLIC
FILE_SET adapters
TYPE HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/pcms
FILES ${ADAPTER_HEADERS})
install(
TARGETS pcms_core
EXPORT pcms_core-targets
Expand All @@ -105,6 +114,7 @@ install(
INCLUDES
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms
FILE_SET adapters DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms
)

configure_package_config_file(
Expand Down Expand Up @@ -158,7 +168,10 @@ install(
INCLUDES
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms
FILE_SET adapters DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms
)


# install external headers
install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pcms/external/
Expand Down
18 changes: 13 additions & 5 deletions src/pcms/capi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,29 @@ set(CAPI_CORE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/client.h
set_target_properties(
pcms_capi_core PROPERTIES PUBLIC_HEADER "${CAPI_CORE_HEADERS}" OUTPUT_NAME pcmscapicore
EXPORT_NAME capi::core)

target_sources(pcms_capi_core PUBLIC
FILE_SET core
TYPE HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
FILES ${CAPI_CORE_HEADERS})
add_library(pcms_capi_interpolator mesh.cpp interpolator.cpp kokkos.cpp)
add_library(pcms::capi::interpolator ALIAS pcms_capi_interpolator)
target_link_libraries(pcms_capi_interpolator PUBLIC MPI::MPI_C PRIVATE pcms::interpolator)
target_include_directories(pcms_capi_interpolator
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>" # this makes the module path cpms/capi
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>" # this makes the module path pcms/capi
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/pcms/capi>")
set(CAPI_INTERPOLATOR_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/interpolator.h
${CMAKE_CURRENT_SOURCE_DIR}/mesh.h)
set_target_properties(pcms_capi_interpolator
PROPERTIES PUBLIC_HEADERS "${CAPI_INTERPOLATOR_HEADERS}"
OUTPUT_NAME pcmscapiinterpolator
EXPORT_NAME capi::interpolator)

target_sources(pcms_capi_interpolator PUBLIC
FILE_SET interpolator
TYPE HEADERS
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
FILES ${CAPI_INTERPOLATOR_HEADERS})
# high level interface target
add_library(pcms_capi INTERFACE)
add_library(pcms::capi ALIAS pcms_capi)
Expand Down Expand Up @@ -63,7 +71,7 @@ install(
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms/capi/)
FILE_SET core DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms)
install(
EXPORT pcms_capi_core-targets
NAMESPACE pcms::
Expand All @@ -77,7 +85,7 @@ install(
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms/capi/)
FILE_SET interpolator DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms)
install(
EXPORT pcms_capi_interpolator-targets
NAMESPACE pcms::
Expand Down
Loading