File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,13 @@ include_directories(lib/wolfssl)
5252# Where should configuration values come from?
5353# dot : parse .config via load_dot_config()
5454# preset : use cacheVariables from CMakePresets.json
55- set (WOLFBOOT_CONFIG_MODE "dot" CACHE STRING "Config source: dot or preset" )
56- set_property (CACHE WOLFBOOT_CONFIG_MODE PROPERTY STRINGS dot preset)
55+ if ( EXISTS "./.config" )
56+ message (STATUS "Found a .config file, will parse" )
57+ set (WOLFBOOT_CONFIG_MODE "dot" CACHE STRING "Config source: dot or preset" )
58+ set_property (CACHE WOLFBOOT_CONFIG_MODE PROPERTY STRINGS dot preset)
59+ else ()
60+ message (STATUS "No .config file found." )
61+ endif ()
5762
5863if (WOLFBOOT_CONFIG_MODE STREQUAL "dot" )
5964 message (STATUS "Config mode: dot (.config cache)" )
@@ -65,7 +70,7 @@ elseif(WOLFBOOT_CONFIG_MODE STREQUAL "preset")
6570 message (STATUS "Config mode: preset (using cacheVariables; skipping .config)" )
6671
6772else ()
68- message (FATAL_ERROR "Invalid WOLFBOOT_CONFIG_MODE=' ${WOLFBOOT_CONFIG_MODE} '. Use 'dot' or 'preset' ." )
73+ message (STATUS "Not using .config nor CMakePresets.json for WOLFBOOT_CONFIG_MODE ." )
6974endif ()
7075
7176
You can’t perform that action at this time.
0 commit comments