Skip to content

Commit

Permalink
Add TTG_USE_[PARSEC|MADNESS] to the ttg-parsec/ttg-mad targets
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Nov 12, 2024
1 parent 3d4a446 commit 3d67f10
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 0 additions & 5 deletions cmake/modules/AddTTGExecutable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
11 changes: 9 additions & 2 deletions ttg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

########################
Expand Down Expand Up @@ -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)

0 comments on commit 3d67f10

Please sign in to comment.