Skip to content

Commit 37f94d6

Browse files
dcpleungnashif
authored andcommitted
cmake: extra_flags: fix EXTRA_CPPFLAGS being applied as macros
The EXTRA_CPPFLAGS is applied via zephyr_compile_definitions() instead of zephyr_compile_options(), which makes all specified options as macros. So fix it. Signed-off-by: Daniel Leung <[email protected]>
1 parent 88ac292 commit 37f94d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/extra_flags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ separate_arguments(EXTRA_CXXFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_CXXFLAGS})
77
separate_arguments(EXTRA_AFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_AFLAGS})
88

99
if(EXTRA_CPPFLAGS)
10-
zephyr_compile_definitions(${EXTRA_CPPFLAGS_AS_LIST})
10+
zephyr_compile_options(${EXTRA_CPPFLAGS_AS_LIST})
1111
endif()
1212
if(EXTRA_LDFLAGS)
1313
zephyr_link_libraries(${EXTRA_LDFLAGS_AS_LIST})

0 commit comments

Comments
 (0)