Skip to content

Commit

Permalink
Merge pull request #303 from devreal/add-impl-select-macro
Browse files Browse the repository at this point in the history
Add TTG_USE_[PARSEC|MADNESS] to the ttg-parsec/ttg-mad targets
  • Loading branch information
evaleev authored Nov 15, 2024
2 parents 6f7c82d + 3d67f10 commit fc6a493
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 @@ -216,7 +216,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 @@ -246,5 +250,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 fc6a493

Please sign in to comment.