mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-03 20:29:56 -06:00
Single-config generators already support unity builds with per-config sources because they compute sources using `CMAKE_BUILD_TYPE` as the configuration. Each original source is either included in the unity build source, or not. Teach multi-config generators to compute the list of sources for inclusion in unity builds using all configurations. Previously they only used the empty string as the configuration. Each original source may be included in some configurations, but not others. Use preprocessor conditions to guard their inclusion when necessary. Fixes: #22892
17 lines
251 B
C
17 lines
251 B
C
#ifdef CFG_DEBUG
|
|
extern void per_config_c_debug(void);
|
|
#endif
|
|
#ifdef CFG_OTHER
|
|
extern void per_config_c_other(void);
|
|
#endif
|
|
int main(void)
|
|
{
|
|
#ifdef CFG_DEBUG
|
|
per_config_c_debug();
|
|
#endif
|
|
#ifdef CFG_OTHER
|
|
per_config_c_other();
|
|
#endif
|
|
return 0;
|
|
}
|