Skip to content

Commit 2f51822

Browse files
committed
[cmake] Correctly propagate options to all repos
1 parent d257401 commit 2f51822

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

tools/build_script_generator/cmake/resources/CMakeLists.txt.in

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
# This file was autogenerated by the modm cmake builder. Do not modify!
1010

1111
cmake_minimum_required(VERSION 3.15)
12+
%% if is_modm
1213
include(cmake/ModmConfiguration.cmake)
14+
%% endif
15+
1316

1417
%% if asm_sources | length
1518
set_source_files_properties(
@@ -38,11 +41,13 @@ add_library({{ repo }} INTERFACE )
3841

3942
%% endif
4043

41-
add_library({{ repo }}_warnings INTERFACE)
42-
add_library({{ repo }}_options INTERFACE)
43-
add_library({{ repo }}_arch_options INTERFACE)
44+
%% if is_modm
45+
add_library(modm_warnings INTERFACE)
46+
add_library(modm_options INTERFACE)
47+
add_library(modm_arch_options INTERFACE)
4448

45-
modm_target_config_create({{ repo }} {{ repo }}_arch_options {{ repo }}_options {{ repo }}_warnings)
49+
modm_target_config_create(modm modm_arch_options modm_options modm_warnings)
50+
%% endif
4651

4752
%% if include_paths | length
4853
target_include_directories({{ repo }} SYSTEM
@@ -59,17 +64,18 @@ target_include_directories({{ repo }} SYSTEM
5964
%% endif
6065

6166

67+
6268
target_link_libraries({{ repo }}
6369
%% if sources | length
6470
PUBLIC
6571
%% else
6672
INTERFACE
6773
%%endif
68-
{{ repo }}_arch_options
74+
modm_arch_options
6975
%% if sources | length
7076
PRIVATE
7177
project_options
72-
{{ repo }}_options
73-
{{ repo }}_warnings
78+
modm_options
79+
modm_warnings
7480
%% endif
7581
)

0 commit comments

Comments
 (0)