DARMA-tasking / vt

DARMA/vt => Virtual Transport
Other
35 stars 8 forks source link

CMake fails to configure when `checkpoint` is present in `lib` #2323

Closed cz4rs closed 1 month ago

cz4rs commented 1 month ago

Describe the bug CMake fails to configure when checkpoint is present in lib directory, but -Dmagistrate_ROOT is not provided:

[cmake] CMake Error at src/CMakeLists.txt:318 (install):
[cmake]   install TARGETS given target "checkpoint" which does not exist.

To Reproduce

cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:STRING=/home/cz4rs/code/vt/build/install -DMPI_C_COMPILER:STRING=mpicc -DMPI_CXX_COMPILER:STRING=mpicxx -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ -S/home/cz4rs/code/vt -B/home/cz4rs/code/vt/build -G Ninja

Expected behavior Following change is enough to fix the issue on vt side:

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 39c3b57a6..5e75e31ca 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -316,7 +316,7 @@ export(

 if (EXISTS "${PROJECT_LIB_DIR}/checkpoint")
   install(
-    TARGETS                 checkpoint
+    TARGETS                 magistrate
     EXPORT                  ${VIRTUAL_TRANSPORT_LIBRARY}
   )
 endif()

That might not be enough if we want to have checkpoint target available here for backwards compatibility.

cz4rs commented 1 month ago

@JacobDomagala Can you please have a look?