From 3d67f10519c5129739db869df2d2e3a51bdcc735 Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Tue, 12 Nov 2024 15:39:27 -0500 Subject: [PATCH] Add TTG_USE_[PARSEC|MADNESS] to the ttg-parsec/ttg-mad targets Signed-off-by: Joseph Schuchart --- cmake/modules/AddTTGExecutable.cmake | 5 ----- ttg/CMakeLists.txt | 11 +++++++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cmake/modules/AddTTGExecutable.cmake b/cmake/modules/AddTTGExecutable.cmake index 7f10ab572..0d2cc442e 100644 --- a/cmake/modules/AddTTGExecutable.cmake +++ b/cmake/modules/AddTTGExecutable.cmake @@ -49,11 +49,6 @@ macro(add_ttg_executable) foreach(r ${ADD_TTG_EXECUTABLE_RUNTIMES}) set(_compile_definitions "TTG_EXECUTABLE=1") - if (r STREQUAL "mad") - list(APPEND _compile_definitions "TTG_USE_MADNESS=1") - elseif(r STREQUAL "parsec") - list(APPEND _compile_definitions "TTG_USE_PARSEC=1") - endif() if (DEFINED ADD_TTG_EXECUTABLE_COMPILE_DEFINITIONS) list(APPEND _compile_definitions "${ADD_TTG_EXECUTABLE_COMPILE_DEFINITIONS}") endif() diff --git a/ttg/CMakeLists.txt b/ttg/CMakeLists.txt index 272f005ab..c7af84106 100644 --- a/ttg/CMakeLists.txt +++ b/ttg/CMakeLists.txt @@ -215,7 +215,11 @@ if (TARGET MADworld) ${CMAKE_CURRENT_SOURCE_DIR}/ttg/madness/ttvalue.h ${CMAKE_CURRENT_SOURCE_DIR}/ttg/madness/watch.h) # N.B. ttg-mad can use MADNESS serialization only - add_ttg_library(ttg-mad "${ttg-mad-headers}" PUBLIC_HEADER "${ttg-mad-headers}" LINK_LIBRARIES "ttg;MADworld;ttg-serialization-madness" COMPILE_DEFINITIONS "WORLD_INSTANTIATE_STATIC_TEMPLATES=1") + add_ttg_library(ttg-mad "${ttg-mad-headers}" + PUBLIC_HEADER "${ttg-mad-headers}" + LINK_LIBRARIES "ttg;MADworld;ttg-serialization-madness" + COMPILE_DEFINITIONS "WORLD_INSTANTIATE_STATIC_TEMPLATES=1" + COMPILE_DEFINITIONS TTG_USE_MADNESS=1) endif(TARGET MADworld) ######################## @@ -245,5 +249,8 @@ if (TARGET PaRSEC::parsec) else() list(APPEND ttg-parsec-deps ttg-serialization) endif() - add_ttg_library(ttg-parsec "${ttg-parsec-headers}" PUBLIC_HEADER "${ttg-parsec-headers}" LINK_LIBRARIES "${ttg-parsec-deps}") + add_ttg_library(ttg-parsec "${ttg-parsec-headers}" + PUBLIC_HEADER "${ttg-parsec-headers}" + LINK_LIBRARIES "${ttg-parsec-deps}" + COMPILE_DEFINITIONS TTG_USE_PARSEC=1) endif(TARGET PaRSEC::parsec)