fix(build): move AddHardwareDefTarget after all add_definitions (#7185)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
This commit is contained in:
co-authored by
raphaelcoeffic
parent
a4e3275ef3
commit
83bc1e2d82
@@ -121,10 +121,6 @@ add_definitions(
|
||||
)
|
||||
|
||||
set(HW_DESC_JSON ${FLAVOUR}.json)
|
||||
AddHardwareDefTarget(${HW_DESC_JSON})
|
||||
|
||||
# enable generating JSON definition separately for debugging
|
||||
add_custom_target(hardware_defs DEPENDS ${HW_DESC_JSON}.h)
|
||||
|
||||
include(hal/CMakeLists.txt)
|
||||
|
||||
@@ -152,6 +148,11 @@ if(ARCH STREQUAL ARM)
|
||||
include(targets/common/arm/CMakeLists.txt)
|
||||
endif()
|
||||
|
||||
# Generate hardware definitions from hal.h
|
||||
# Must be after all add_definitions() so the preprocessor sees all flags
|
||||
AddHardwareDefTarget(${HW_DESC_JSON})
|
||||
add_custom_target(hardware_defs DEPENDS ${HW_DESC_JSON}.h)
|
||||
|
||||
include_directories(targets/${TARGET_DIR} ${THIRDPARTY_DIR})
|
||||
|
||||
if(NATIVE_BUILD)
|
||||
|
||||
Reference in New Issue
Block a user