File: CopyHeaders.cmake

package info (click to toggle)
opm-common 2022.10%2Bds-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 78,468 kB
  • sloc: cpp: 164,554; python: 2,872; sh: 216; xml: 174; ansic: 149; pascal: 136; makefile: 12
file content (40 lines) | stat: -rw-r--r-- 2,023 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
                        ${BASE_DIR}/tmp_gen/ParserInit.cpp
                        ${BASE_DIR}/ParserInit.cpp)

execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
                        ${BASE_DIR}/tmp_gen/TestKeywords.cpp
                        ${BASE_DIR}/TestKeywords.cpp)

if (EXISTS ${BASE_DIR}/python/cxx)
  execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
                          ${BASE_DIR}/tmp_gen/builtin_pybind11.cpp
                          ${BASE_DIR}/python/cxx/builtin_pybind11.cpp)
endif()

execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
                        ${BASE_DIR}/tmp_gen/include/opm/input/eclipse/Parser/ParserKeywords/Builtin.hpp
                        ${BASE_DIR}/include/opm/input/eclipse/Parser/ParserKeywords/Builtin.hpp)


file(GLOB HDRS ${BASE_DIR}/tmp_gen/include/opm/input/eclipse/Parser/ParserKeywords/*.hpp)

foreach(HDR ${HDRS})
  file(RELATIVE_PATH hdr ${BASE_DIR}/tmp_gen/include/opm/input/eclipse/Parser/ParserKeywords ${HDR})
  execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
                          ${HDR}
                          ${BASE_DIR}/include/opm/input/eclipse/Parser/ParserKeywords/${hdr})

endforeach()

foreach (name A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
    execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
                            ${BASE_DIR}/tmp_gen/ParserKeywords/${name}.cpp
                            ${BASE_DIR}/ParserKeywords/${name}.cpp)
    execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
                            ${BASE_DIR}/tmp_gen/ParserKeywords/ParserInit${name}.cpp
                            ${BASE_DIR}/ParserKeywords/ParserInit${name}.cpp)
    execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
                            ${BASE_DIR}/tmp_gen/ParserKeywords/Builtin${name}.cpp
                            ${BASE_DIR}/ParserKeywords/Builtin${name}.cpp)
endforeach()