Skip to content

Commit

Permalink
#519 filter dynawo-algorithms dictionaries_ammping to avoid duplicata
Browse files Browse the repository at this point in the history
when distrib is used
closes #519
  • Loading branch information
rosiereflo authored and gautierbureau committed Jan 20, 2023
1 parent 88df463 commit 70c5c8e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,17 @@ function(cat IN_FILE OUT_FILE)
file(READ ${IN_FILE} CONTENTS)
file(APPEND ${OUT_FILE} "${CONTENTS}")
endfunction()
function(cat_filter IN_FILE OUT_FILE FILTER)
file(STRINGS ${IN_FILE} CONTENTS)
foreach(LINE ${CONTENTS})
if (${LINE} MATCHES "${FILTER}")
file(APPEND ${OUT_FILE} "${LINE}\n")
endif()
endforeach()
endfunction()
file(WRITE dictionaries_mapping.dic "")
cat(${DYNAWO_HOME}/share/dictionaries_mapping.dic dictionaries_mapping.dic)
cat(${DYNAWO_ALGORITHMS_HOME}/share/dictionaries_mapping.dic dictionaries_mapping.dic)
cat_filter(${DYNAWO_ALGORITHMS_HOME}/share/dictionaries_mapping.dic dictionaries_mapping.dic "Algorithms")
install(FILES dictionaries_mapping.dic DESTINATION ${CMAKE_INSTALL_PREFIX}/share/)

# MPI (required by algorithms)
Expand Down

0 comments on commit 70c5c8e

Please sign in to comment.