Commit 3d4c238a authored by Dominik Charousset's avatar Dominik Charousset

Fix build with unit tests enabled

parent 962c53d0
......@@ -110,7 +110,6 @@ set_build_flag() {
exit 1
;;
esac
echo "append_cache_entry $FlagName BOOL $2"
append_cache_entry $FlagName BOOL $2
}
......@@ -125,10 +124,7 @@ while [ $# -ne 0 ]; do
--*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
--enable-*) optarg=`echo "$1" | sed 's/--enable-//'` ;;
--disable-*) optarg=`echo "$1" | sed 's/--disable-//'` ;;
*)
echo "Invalid syntax '$1'. Try $0 --help to see available options."
exit 1
;;
*) ;;
esac
# Consume current input.
case "$1" in
......
......@@ -68,7 +68,7 @@ if(TARGET CAF::io)
endif()
if(CAF_BUILD_PROTOBUF_EXAMPLES)
if(CAF_ENABLE_PROTOBUF_EXAMPLES)
find_package(Protobuf REQUIRED)
if(NOT PROTOBUF_PROTOC_EXECUTABLE)
message(FATAL_ERROR "CMake was unable to set PROTOBUF_PROTOC_EXECUTABLE")
......@@ -81,7 +81,7 @@ if(CAF_BUILD_PROTOBUF_EXAMPLES)
add_dependencies(protobuf_broker all_examples)
endif()
if(CAF_BUILD_QT5_EXAMPLES)
if(CAF_ENABLE_QT5_EXAMPLES)
find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED)
message(STATUS "Found Qt5")
#include(${QT_USE_FILE})
......@@ -108,7 +108,7 @@ if(CAF_BUILD_QT5_EXAMPLES)
add_dependencies(qt_group_chat all_examples)
endif()
if(CAF_BUILD_CURL_EXAMPLES)
if(CAF_ENABLE_CURL_EXAMPLES)
find_package(CURL REQUIRED)
add_executable(curl_fuse curl/curl_fuse.cpp)
include_directories(${CURL_INCLUDE_DIRS})
......
......@@ -182,7 +182,7 @@ endif()
target_link_libraries(libcaf_core PUBLIC Threads::Threads)
if(MSVC)
target_link_libraries(libcaf_io PUBLIC iphlpapi)
target_link_libraries(libcaf_core PUBLIC iphlpapi)
endif()
if(CAF_SANITIZERS)
......@@ -223,7 +223,7 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/caf"
# -- build unit tests ----------------------------------------------------------
if(NOT CAF_BUILD_TESTING)
if(NOT CAF_ENABLE_TESTING)
return()
endif()
......
......@@ -112,7 +112,7 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/caf"
# -- build unit tests ----------------------------------------------------------
if(NOT CAF_BUILD_TESTING)
if(NOT CAF_ENABLE_TESTING)
return()
endif()
......@@ -124,9 +124,9 @@ target_include_directories(caf-io-test PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/test
target_compile_definitions(caf-io-test PRIVATE libcaf_io_EXPORTS)
target_link_libraries(caf-io-test CAF::core CAF::test)
target_link_libraries(caf-io-test PRIVATE CAF::core CAF::test)
target_link_libraries(caf-core-test PRIVATE
target_link_libraries(caf-io-test PRIVATE
$<TARGET_PROPERTY:libcaf_io,INTERFACE_LINK_LIBRARIES>)
target_include_directories(caf-io-test PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
......
......@@ -78,7 +78,7 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/caf"
# -- build unit tests ----------------------------------------------------------
if(NOT CAF_BUILD_TESTING)
if(NOT CAF_ENABLE_TESTING)
return()
endif()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment