Skip to content

Commit

Permalink
Update Pull #443, allow multiple config files
Browse files Browse the repository at this point in the history
The "include()" cmake function only read the first file when passed a list.
Adding a foreach loop supports allowing a list of files which is useful
for adding and override/addendum file to a base config.
  • Loading branch information
jphickey committed May 4, 2020
1 parent a12baba commit 20f8b18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ include("${OSAL_SOURCE_DIR}/default_config.cmake")

# The user-specified file is optional, but in case the value is defined but the
# file does not exist, this should be treated as an error.
if (DEFINED OSAL_CONFIGURATION_FILE)
include(${OSAL_CONFIGURATION_FILE})
endif (DEFINED OSAL_CONFIGURATION_FILE)
foreach(CONFIG ${OSAL_CONFIGURATION_FILE})
include(${CONFIG})
endforeach(CONFIG OSAL_CONFIGURATION_FILE)

# Use the supplied configuration to generate the osconfig.h file
# which can be referenced by the code. This will be stored in the top level
Expand Down

0 comments on commit 20f8b18

Please sign in to comment.