zephyr/cmake/extra_flags.cmake
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00

30 lines
977 B
CMake

# SPDX-License-Identifier: Apache-2.0
separate_arguments(EXTRA_CPPFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_CPPFLAGS})
separate_arguments(EXTRA_LDFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_LDFLAGS})
separate_arguments(EXTRA_CFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_CFLAGS})
separate_arguments(EXTRA_CXXFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_CXXFLAGS})
separate_arguments(EXTRA_AFLAGS_AS_LIST UNIX_COMMAND ${EXTRA_AFLAGS})
if(EXTRA_CPPFLAGS)
zephyr_compile_definitions(${EXTRA_CPPFLAGS_AS_LIST})
endif()
if(EXTRA_LDFLAGS)
zephyr_link_libraries(${EXTRA_LDFLAGS_AS_LIST})
endif()
if(EXTRA_CFLAGS)
foreach(F ${EXTRA_CFLAGS_AS_LIST})
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:${F}>)
endforeach()
endif()
if(EXTRA_CXXFLAGS)
foreach(F ${EXTRA_CXXFLAGS_AS_LIST})
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:${F}>)
endforeach()
endif()
if(EXTRA_AFLAGS)
foreach(F ${EXTRA_AFLAGS_AS_LIST})
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:${F}>)
endforeach()
endif()