Skip to content

Commit

Permalink
Merge pull request #357 from DARMA-tasking/356-fix-failures-when-usin…
Browse files Browse the repository at this point in the history
…g-magistrate-as-add-subdirectory

#356: Fix backward compatibility with using `magistrate` via `add_subdirectory()` and wanting to use `vt::lib::checkpoint` target
  • Loading branch information
lifflander authored Jul 9, 2024
2 parents f75c80c + 81e5a79 commit 9ddefa7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ if (magistrate_ubsan_enabled)
endif()
endif()

set(MAGISTRATE_LIBRARY checkpoint CACHE INTERNAL "" FORCE )
set(MAGISTRATE_LIBRARY magistrate CACHE INTERNAL "" FORCE )
set(MAGISTRATE_LIBRARY_NS vt::lib::magistrate "" CACHE INTERNAL "" FORCE )
set(CHECKPOINT_LIBRARY_NS vt::lib::checkpoint "" CACHE INTERNAL "" FORCE )

set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
1 change: 0 additions & 1 deletion cmake/magistrateConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${SELF_DIR}/magistrateTargets.cmake)

add_library(vt::lib::magistrate ALIAS vt::lib::checkpoint)
# set(vt::lib::magistrate vt::lib::checkpoint)

include(CMakeFindDependencyMacro)

Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ add_library(
)
set_property(TARGET ${MAGISTRATE_LIBRARY} PROPERTY EXPORT_NAME checkpoint)
add_library(${MAGISTRATE_LIBRARY_NS} ALIAS ${MAGISTRATE_LIBRARY})
add_library(${CHECKPOINT_LIBRARY_NS} ALIAS ${MAGISTRATE_LIBRARY})

target_compile_features(${MAGISTRATE_LIBRARY} PUBLIC cxx_std_17)

Expand Down

0 comments on commit 9ddefa7

Please sign in to comment.