Skip to content

Commit

Permalink
Fix build with testing disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Neverlord committed Jan 12, 2021
1 parent a5efbcf commit e106fe3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ function(caf_incubator_add_component name)
else()
set(targets ${pub_lib_target})
add_library(${pub_lib_target}
${CAF_INC_ADD_COMPONENT_HEADERS})
${CAF_INC_ADD_COMPONENT_HEADERS}
${CAF_INC_ADD_COMPONENT_SOURCES})
set_property(TARGET ${pub_lib_target} PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
target_link_libraries(${pub_lib_target} ${CAF_INC_ADD_COMPONENT_DEPENDENCIES})
Expand Down Expand Up @@ -303,7 +304,7 @@ if(CAF_INC_ENABLE_NET_MODULE)
add_subdirectory(libcaf_net)
endif()

if(CAF_INC_ENABLE_NET_MODULE)
if(CAF_INC_ENABLE_BB_MODULE)
add_subdirectory(libcaf_bb)
endif()

Expand Down
4 changes: 3 additions & 1 deletion libcaf_bb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ caf_incubator_add_component(
tokenized_integer_reader)

# CAF::bb is header-only, so it won't pull in the dependencies for the tests.
target_link_libraries(caf-bb-test PRIVATE CAF::core CAF::internal)
if(TARGET caf-bb-test)
target_link_libraries(caf-bb-test PRIVATE CAF::core CAF::internal)
endif()

0 comments on commit e106fe3

Please sign in to comment.