mirror of https://github.com/ARMmbed/mbed-os.git
cmake: Set MBED_TEST_MODE with INTERFACE
Set MBED_TEST_MODE with INTERFACE. Use INTERFACE because mbed-os is an interface target, and we can only set INTERFACE properties on interface targets. This helps avoid the following error when building an application. CMake Error at mbed-os/CMakeLists.txt:96 (target_compile_definitions): target_compile_definitions may only set INTERFACE properties on INTERFACE targetspull/14803/head
parent
c3f3ed7661
commit
ef07746443
|
@ -94,7 +94,7 @@ if(${CMAKE_CROSSCOMPILING})
|
|||
# Add MBED_TEST_MODE for backward compatibility with Greentea tests written for use with Mbed CLI 1
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
MBED_TEST_MODE
|
||||
)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue