mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Further classify source files into languages
Other modules (notably the precompiled header one) may set properties directly on the source file; we need to separate them into categories for which language they belong to.
This commit is contained in:
parent
6e2084cf15
commit
166033ce1f
@ -39,6 +39,16 @@ macro (opm_sources opm)
|
||||
# names in the process
|
||||
foreach (_file IN LISTS MAIN_SOURCE_FILES)
|
||||
list (APPEND ${opm}_SOURCES ${PROJECT_SOURCE_DIR}/${_file})
|
||||
# further classify into language if some other modules need to add props
|
||||
if (_file MATCHES ".*\\.[cC][a-zA-Z]*$")
|
||||
if (_file MATCHES ".*\\.c$")
|
||||
list (APPEND ${opm}_C_SOURCES ${PROJECT_SOURCE_DIR}/${_file})
|
||||
else (_file MATCHES ".*\\.c$")
|
||||
list (APPEND ${opm}_CXX_SOURCES ${PROJECT_SOURCE_DIR}/${_file})
|
||||
endif (_file MATCHES ".*\\.c$")
|
||||
elseif (_file MATCHES ".*\\.[fF][a-zA-Z]*$")
|
||||
list (APPEND ${opm}_Fortran_SOURCES ${PROJECT_SOURCE_DIR}/${_file})
|
||||
endif (_file MATCHES ".*\\.[cC][a-zA-Z]*$")
|
||||
endforeach (_file)
|
||||
foreach (_file IN LISTS PUBLIC_HEADER_FILES)
|
||||
list (APPEND ${opm}_HEADERS ${PROJECT_SOURCE_DIR}/${_file})
|
||||
|
Loading…
Reference in New Issue
Block a user