File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,26 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
8686 endif ()
8787endif ()
8888
89+ # =============================================================================
90+ # AUTO-GENERATE DEVELOPMENT CONFIG IF MISSING
91+ # =============================================================================
92+ # development_config.cpp is git-ignored because it can contain secrets.
93+ # For CI builds or fresh checkouts, we auto-generate a stub from the template.
94+
95+ set (DEV_CONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR} /src/infrastructure/network/development_config.cpp" )
96+ set (DEV_CONFIG_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR} /src/infrastructure/network/development_config.cpp.template" )
97+
98+ if (NOT EXISTS "${DEV_CONFIG_FILE} " )
99+ if (EXISTS "${DEV_CONFIG_TEMPLATE} " )
100+ message (STATUS "development_config.cpp not found, generating stub from template..." )
101+ file (READ "${DEV_CONFIG_TEMPLATE} " DEV_CONFIG_CONTENT )
102+ file (WRITE "${DEV_CONFIG_FILE} " "${DEV_CONFIG_CONTENT} " )
103+ message (STATUS "Generated: ${DEV_CONFIG_FILE} " )
104+ else ()
105+ message (FATAL_ERROR "Neither development_config.cpp nor .template found!" )
106+ endif ()
107+ endif ()
108+
89109# =============================================================================
90110# SOURCE FILES
91111# =============================================================================
You can’t perform that action at this time.
0 commit comments