File tree Expand file tree Collapse file tree 4 files changed +43
-0
lines changed
examples/external-usage-example Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -221,3 +221,15 @@ jobs:
221221
222222 - name : Print Test
223223 run : cat ${{ runner.temp }}/build-pcms/Testing/Temporary/LastTest.log
224+
225+ - name : Test PCMS Installation
226+ shell : bash
227+ run : |
228+ # Configure and build the test
229+ # it should only ask for pcms_DIR/ROOT to find all dependencies
230+ cmake \
231+ -B ${{github.workspace}}/examples/external-usage-example/build \
232+ -S ${{github.workspace}}/examples/external-usage-example/ \
233+ -Dpcms_DIR=${{ runner.temp }}/build-pcms/install/lib/cmake/pcms \
234+
235+ cmake --build ${{github.workspace}}/examples/external-usage-example/build
Original file line number Diff line number Diff line change 33include (CMakeFindDependencyMacro)
44find_dependency(redev CONFIG HINTS @redev_DIR@)
55find_dependency(Kokkos CONFIG HINTS @Kokkos_DIR@)
6+ find_dependency(meshfields CONFIG HINTS @meshfields_DIR@)
7+ find_dependency(ADIOS2 CONFIG HINTS @ADIOS2_DIR@)
68find_dependency(MPI)
79
10+ if (@spdlog_FOUND)
11+ find_dependency(spdlog CONFIG HINTS @spdlog_DIR@)
12+ endif ()
13+
814if (@PCMS_ENABLE_OMEGA_H@)
915 find_dependency(Omega_h CONFIG HINTS @Omega_h_DIR@)
1016endif ()
Original file line number Diff line number Diff line change 1+ # ########### Configure and Link pcms Library ##################################
2+ # This is an example CMakeLists.txt file to configure and link the pcms library
3+ # with an external project.
4+ # ##############################################################################
5+
6+ cmake_minimum_required (VERSION 3.19)
7+ project (pcms_installation_test)
8+
9+ # It searches in pcms_ROOT, pcms_DIR, or other standard paths
10+ find_package (pcms REQUIRED)
11+
12+ add_executable (pcms_test main.cpp)
13+
14+ # Link the pcms library to the executable Other target names cound be found in
15+ # your installation's <pcms install dir>/lib64/cmake/pcms/pcms-targets.cmake
16+ target_link_libraries (pcms_test PUBLIC pcms::pcms)
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ #include < pcms/print.h>
3+
4+ int main ()
5+ {
6+ std::cout << " Testing PCMS dependency export..." << std::endl;
7+ pcms::printInfo (" Dependency test successful!\n " );
8+ return 0 ;
9+ }
You can’t perform that action at this time.
0 commit comments