diff --git a/examples/system/freertos/zynqmp_r5/zynqmp_amp_demo/CMakeLists.txt b/examples/system/freertos/zynqmp_r5/zynqmp_amp_demo/CMakeLists.txt index 1aff6dd..0a2aafa 100644 --- a/examples/system/freertos/zynqmp_r5/zynqmp_amp_demo/CMakeLists.txt +++ b/examples/system/freertos/zynqmp_r5/zynqmp_amp_demo/CMakeLists.txt @@ -15,6 +15,10 @@ list(APPEND _src0 ${CMAKE_CURRENT_SOURCE_DIR}/sys_init.c) get_property (_linker_options GLOBAL PROPERTY TEST_LINKER_OPTIONS) add_executable (${_app0}.elf ${_src0}) +if (PROJECT_EC_FLAGS) + string(REPLACE " " ";" _ec_flgs ${PROJECT_EC_FLAGS}) + target_compile_options (${_app0}.elf PUBLIC ${_ec_flgs}) +endif (PROJECT_EC_FLAGS) target_link_libraries(${_app0}.elf -Wl,-Map=${_app0}.map -Wl,--gc-sections -T\"${_linker_script}\" -Wl,--start-group ${_deps} -Wl,--end-group) install (TARGETS ${_app0}.elf RUNTIME DESTINATION bin) diff --git a/examples/system/generic/zynqmp_r5/zynqmp_amp_demo/CMakeLists.txt b/examples/system/generic/zynqmp_r5/zynqmp_amp_demo/CMakeLists.txt index 1aff6dd..0a2aafa 100644 --- a/examples/system/generic/zynqmp_r5/zynqmp_amp_demo/CMakeLists.txt +++ b/examples/system/generic/zynqmp_r5/zynqmp_amp_demo/CMakeLists.txt @@ -15,6 +15,10 @@ list(APPEND _src0 ${CMAKE_CURRENT_SOURCE_DIR}/sys_init.c) get_property (_linker_options GLOBAL PROPERTY TEST_LINKER_OPTIONS) add_executable (${_app0}.elf ${_src0}) +if (PROJECT_EC_FLAGS) + string(REPLACE " " ";" _ec_flgs ${PROJECT_EC_FLAGS}) + target_compile_options (${_app0}.elf PUBLIC ${_ec_flgs}) +endif (PROJECT_EC_FLAGS) target_link_libraries(${_app0}.elf -Wl,-Map=${_app0}.map -Wl,--gc-sections -T\"${_linker_script}\" -Wl,--start-group ${_deps} -Wl,--end-group) install (TARGETS ${_app0}.elf RUNTIME DESTINATION bin) diff --git a/examples/system/linux/zynqmp/zynqmp_amp_demo/CMakeLists.txt b/examples/system/linux/zynqmp/zynqmp_amp_demo/CMakeLists.txt index d488d48..80abc04 100644 --- a/examples/system/linux/zynqmp/zynqmp_amp_demo/CMakeLists.txt +++ b/examples/system/linux/zynqmp/zynqmp_amp_demo/CMakeLists.txt @@ -13,6 +13,10 @@ foreach (_app libmetal_amp_demo libmetal_amp_demod) if (WITH_SHARED_LIB) add_executable (${_app}-share ${_src}) + if (PROJECT_EC_FLAGS) + string(REPLACE " " ";" _ec_flgs ${PROJECT_EC_FLAGS}) + target_compile_options (${_app}-share PUBLIC ${_ec_flgs}) + endif (PROJECT_EC_FLAGS) target_link_libraries (${_app}-share ${PROJECT_NAME}-shared ${_deps}) install (TARGETS ${_app}-share RUNTIME DESTINATION bin) add_dependencies (${_app}-share ${PROJECT_NAME}-shared) @@ -21,6 +25,10 @@ foreach (_app libmetal_amp_demo libmetal_amp_demod) if (WITH_STATIC_LIB) if (${PROJECT_SYSTEM} STREQUAL "linux") add_executable (${_app}-static ${_src}) + if (PROJECT_EC_FLAGS) + string(REPLACE " " ";" _ec_flgs ${PROJECT_EC_FLAGS}) + target_compile_options (${_app}-static PUBLIC ${_ec_flgs}) + endif (PROJECT_EC_FLAGS) target_link_libraries (${_app}-static ${PROJECT_NAME}-static ${_deps}) install (TARGETS ${_app}-static RUNTIME DESTINATION bin) endif (${PROJECT_SYSTEM} STREQUAL "linux")