File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616# Get osal properties
1717get_target_property (OSAL_SOURCES osal SOURCES )
1818get_target_property (OSAL_OPTIONS osal COMPILE_OPTIONS )
19+ get_target_property (OSAL_COMPILE_DEFINITIONS osal COMPILE_DEFINITIONS )
1920get_target_property (OSAL_INCLUDES osal INCLUDE_DIRECTORIES)
2021get_target_property (OSAL_LIBS osal LINK_LIBRARIES )
2122
22- if (OSAL_LIBS STREQUAL "OSAL_LIBS-NOTFOUND" )
23+ if (NOT OSAL_OPTIONS)
24+ set (OSAL_OPTIONS "" )
25+ endif ()
26+
27+ if (NOT OSAL_COMPILE_DEFINITIONS)
28+ set (OSAL_COMPILE_DEFINITIONS "" )
29+ endif ()
30+
31+ if (NOT OSAL_INCLUDES)
32+ set (OSAL_INCLUDES "" )
33+ endif ()
34+
35+ if (NOT OSAL_LIBS)
2336 set (OSAL_LIBS "" )
2437endif ()
2538
@@ -43,9 +56,14 @@ target_sources(osal_test PRIVATE
4356 osal_test.cpp
4457 )
4558
59+ target_compile_definitions (osal_test
60+ PRIVATE
61+ UNIT_TEST
62+ ${OSAL_COMPILE_DEFINITIONS}
63+ )
64+
4665target_compile_options (osal_test
4766 PRIVATE
48- -DUNIT_TEST
4967 ${OSAL_OPTIONS}
5068 )
5169
You can’t perform that action at this time.
0 commit comments