Commit c58ee73e authored by Dominik Charousset's avatar Dominik Charousset

Fix static-only build

parent 68612de5
......@@ -321,7 +321,11 @@ if(NOT CAF_NO_UNIT_TESTS)
enable_testing()
message(STATUS "Enter subdirectory unit_testing")
add_subdirectory(unit_testing)
if(NOT CAF_BUILD_STATIC_ONLY)
add_dependencies(all_unit_tests libcaf_io)
else()
add_dependencies(all_unit_tests libcaf_ioStatic)
endif()
if(NOT CAF_NO_OPENCL AND EXISTS "${CMAKE_SOURCE_DIR}/libcaf_opencl/CMakeLists.txt")
add_subdirectory(libcaf_opencl/unit_testing)
endif()
......@@ -330,10 +334,18 @@ endif()
if(NOT CAF_NO_EXAMPLES)
message(STATUS "Enter subdirectory examples")
add_subdirectory(examples)
if(NOT CAF_BUILD_STATIC_ONLY)
add_dependencies(all_examples libcaf_io)
else()
add_dependencies(all_examples libcaf_ioStatic)
endif()
if(NOT CAF_NO_OPENCL AND EXISTS "${CMAKE_SOURCE_DIR}/libcaf_opencl/CMakeLists.txt")
add_subdirectory(libcaf_opencl/examples)
if(NOT CAF_BUILD_STATIC_ONLY)
add_dependencies(opencl_examples libcaf_opencl)
else()
add_dependencies(opencl_examples libcaf_openclStatic)
endif()
endif()
endif()
# build RIAC if not being told otherwise
......@@ -398,7 +410,11 @@ endif()
if(NOT CAF_NO_BENCHMARKS AND EXISTS "${CMAKE_SOURCE_DIR}/benchmarks/CMakeLists.txt")
message(STATUS "Enter subdirectory benchmarks")
add_subdirectory(benchmarks)
if(CAF_BUILD_STATIC_ONLY)
add_dependencies(all_benchmarks libcaf_ioStatic)
else()
add_dependencies(all_benchmarks libcaf_io)
endif()
else()
# make sure variable is set for build log
set(CAF_NO_BENCHMARKS yes)
......
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