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