Skip to content

Commit 0456d64

Browse files
authored
set WITH_SIMPLE_SWITCH when compiling with targets (#1324)
Signed-off-by: Glen Gibb <[email protected]>
1 parent ae4a3ae commit 0456d64

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

PI/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ target_include_directories(bmpi PRIVATE
2727
# FIXME: remove the redundant moves
2828
target_compile_options(bmpi PRIVATE "-Wno-error=redundant-move")
2929

30+
if(WITH_TARGETS)
31+
target_compile_definitions(bmpi PRIVATE WITH_SIMPLE_SWITCH)
32+
33+
target_include_directories(bmpi PRIVATE
34+
${CMAKE_SOURCE_DIR}/targets/simple_switch
35+
)
36+
endif()
37+
3038
install(TARGETS bmpi
3139
LIBRARY DESTINATION lib
3240
ARCHIVE DESTINATION lib

0 commit comments

Comments
 (0)