Merge pull request #300 from rolk/300_precomp
Further classify source files into languages Needed, for instance, to properly assign derived properties to a subset of the sources. This feature is used in the PCH module (UsePrecompHeaders.cmake)
This commit is contained in:
commit
dc859e30ac
@ -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