Skip to content

Commit e594351

Browse files
committed
Bugfix not exporting compile options for flash_loader target
1 parent 3cacee3 commit e594351

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

CMakeLists.txt

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,28 @@ target_compile_features(flash_loader PUBLIC cxx_std_20)
3939
set_target_properties(flash_loader PROPERTIES OUTPUT_NAME "flash_loader" SUFFIX ".elf")
4040

4141
# compiler optimisations
42-
target_compile_options(flash_loader PRIVATE "-g")
43-
target_compile_options(flash_loader PRIVATE "-Os")
42+
target_compile_options(flash_loader PUBLIC "-g")
43+
target_compile_options(flash_loader PUBLIC "-Os")
4444

4545
# set the cpu options for the compiler
46-
target_compile_options(flash_loader PRIVATE "-march=armv7e-m")
47-
target_compile_options(flash_loader PRIVATE "-mcpu=cortex-m4")
48-
target_compile_options(flash_loader PRIVATE "-mthumb")
46+
target_compile_options(flash_loader PUBLIC "-march=armv7e-m")
47+
target_compile_options(flash_loader PUBLIC "-mcpu=cortex-m4")
48+
target_compile_options(flash_loader PUBLIC "-mthumb")
4949

5050
# other compiler settings
51-
target_compile_options(flash_loader PRIVATE "-Wno-attributes")
52-
target_compile_options(flash_loader PRIVATE "-fno-non-call-exceptions")
53-
target_compile_options(flash_loader PRIVATE "-fno-common")
54-
target_compile_options(flash_loader PRIVATE "-ffunction-sections")
55-
target_compile_options(flash_loader PRIVATE "-fdata-sections")
56-
target_compile_options(flash_loader PRIVATE "-fno-exceptions")
57-
target_compile_options(flash_loader PRIVATE "-Wno-maybe-uninitialized")
58-
target_compile_options(flash_loader PRIVATE "-Wno-unused-local-typedefs")
59-
target_compile_options(flash_loader PRIVATE "-Wno-unused-but-set-variable")
60-
target_compile_options(flash_loader PRIVATE "-Wno-unused-function")
61-
target_compile_options(flash_loader PRIVATE "-fomit-frame-pointer")
62-
target_compile_options(flash_loader PRIVATE "-Wall")
63-
target_compile_options(flash_loader PRIVATE "-Werror")
51+
target_compile_options(flash_loader PUBLIC "-Wno-attributes")
52+
target_compile_options(flash_loader PUBLIC "-fno-non-call-exceptions")
53+
target_compile_options(flash_loader PUBLIC "-fno-common")
54+
target_compile_options(flash_loader PUBLIC "-ffunction-sections")
55+
target_compile_options(flash_loader PUBLIC "-fdata-sections")
56+
target_compile_options(flash_loader PUBLIC "-fno-exceptions")
57+
target_compile_options(flash_loader PUBLIC "-Wno-maybe-uninitialized")
58+
target_compile_options(flash_loader PUBLIC "-Wno-unused-local-typedefs")
59+
target_compile_options(flash_loader PUBLIC "-Wno-unused-but-set-variable")
60+
target_compile_options(flash_loader PUBLIC "-Wno-unused-function")
61+
target_compile_options(flash_loader PUBLIC "-fomit-frame-pointer")
62+
target_compile_options(flash_loader PUBLIC "-Wall")
63+
target_compile_options(flash_loader PUBLIC "-Werror")
6464

6565
# set the c++ only options
6666
target_compile_options(flash_loader PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-fno-threadsafe-statics>)
@@ -71,9 +71,9 @@ target_compile_options(flash_loader PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-fno-use-cx
7171
target_compile_options(flash_loader PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-Wno-volatile>)
7272

7373
# set the cpu options for the linker
74-
target_link_options(flash_loader PRIVATE "-march=armv7e-m")
75-
target_link_options(flash_loader PRIVATE "-mcpu=cortex-m4")
76-
target_link_options(flash_loader PRIVATE "-mthumb")
74+
target_link_options(flash_loader PUBLIC "-march=armv7e-m")
75+
target_link_options(flash_loader PUBLIC "-mcpu=cortex-m4")
76+
target_link_options(flash_loader PUBLIC "-mthumb")
7777

7878
# other linker options
7979
target_link_options(flash_loader PUBLIC "-ffunction-sections")

0 commit comments

Comments
 (0)