From 81e5a79630716573a772d726ccba77dd1e4fc630 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Tue, 9 Jul 2024 02:01:08 +0200 Subject: [PATCH] #356: Fix backward compatibility with using magistrate via add_subdirectory() and wanting to use vt::lib::checkpoint target --- CMakeLists.txt | 3 ++- cmake/magistrateConfig.cmake.in | 1 - src/CMakeLists.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae6680c3..c6af63c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/magistrateConfig.cmake.in b/cmake/magistrateConfig.cmake.in index 2a6ac043..f2213d8c 100644 --- a/cmake/magistrateConfig.cmake.in +++ b/cmake/magistrateConfig.cmake.in @@ -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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4d7f4ec4..8fc5d102 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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)