Skip to content

Commit c0585ad

Browse files
freertos-config: Fix library definitions scope (#1164)
Since `freertos_config` is an interface library, `INTERFACE` scope shall be used to define compile definitions. Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>
1 parent 7215c89 commit c0585ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

portable/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ if (DEFINED FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG )
804804
-mbranch-protection=bti+pac-ret+leaf
805805
)
806806
target_compile_definitions(freertos_config
807-
PUBLIC
807+
INTERFACE
808808
configENABLE_PAC=1
809809
configENABLE_BTI=1
810810
)
@@ -815,7 +815,7 @@ if (DEFINED FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG )
815815
target_compile_options(freertos_kernel_port PUBLIC $<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-mbranch-protection=pac-ret>)
816816
target_compile_options(freertos_kernel_port PUBLIC $<$<STREQUAL:${CMAKE_C_COMPILER_ID},IAR>:$<$<COMPILE_LANGUAGE:C,CXX>:--branch_protection=pac-ret>>)
817817
target_compile_definitions(freertos_config
818-
PUBLIC
818+
INTERFACE
819819
configENABLE_PAC=1
820820
)
821821
elseif(FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG STREQUAL "ARM_V_8_1_M_PACBTI_CONFIG_PACRET_LEAF")
@@ -825,7 +825,7 @@ if (DEFINED FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG )
825825
-mbranch-protection=pac-ret+leaf
826826
)
827827
target_compile_definitions(freertos_config
828-
PUBLIC
828+
INTERFACE
829829
configENABLE_PAC=1
830830
)
831831
elseif(${CMAKE_C_COMPILER_ID} STREQUAL "IAR")
@@ -835,7 +835,7 @@ if (DEFINED FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG )
835835
target_compile_options(freertos_kernel_port PUBLIC $<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-mbranch-protection=bti>)
836836
target_compile_options(freertos_kernel_port PUBLIC $<$<STREQUAL:${CMAKE_C_COMPILER_ID},IAR>:$<$<COMPILE_LANGUAGE:C,CXX>:--branch_protection=bti>>)
837837
target_compile_definitions(freertos_config
838-
PUBLIC
838+
INTERFACE
839839
configENABLE_BTI=1
840840
)
841841
elseif(FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG STREQUAL "ARM_V_8_1_M_PACBTI_CONFIG_NONE")
@@ -846,7 +846,7 @@ if (DEFINED FREERTOS_ARM_V_8_1_M_PACBTI_CONFIG )
846846
)
847847
endif()
848848
target_compile_definitions(freertos_config
849-
PUBLIC
849+
INTERFACE
850850
configENABLE_PAC=0
851851
configENABLE_BTI=0
852852
)

0 commit comments

Comments
 (0)