Commit 38bdad81 authored by Marian Triebe's avatar Marian Triebe

Add libcaf_opencl as submodule

parent 8581de85
...@@ -13,3 +13,6 @@ ...@@ -13,3 +13,6 @@
[submodule "shell"] [submodule "shell"]
path = shell path = shell
url = https://github.com/actor-framework/shell url = https://github.com/actor-framework/shell
[submodule "opencl"]
path = libcaf_opencl
url = https://github.com/actor-framework/opencl.git
...@@ -179,6 +179,12 @@ install(DIRECTORY libcaf_core/cppa/ ...@@ -179,6 +179,12 @@ install(DIRECTORY libcaf_core/cppa/
# install includes from io # install includes from io
install(DIRECTORY libcaf_io/caf/ DESTINATION include/caf install(DIRECTORY libcaf_io/caf/ DESTINATION include/caf
FILES_MATCHING PATTERN "*.hpp") FILES_MATCHING PATTERN "*.hpp")
# install includes from opencl
if(EXISTS ${CMAKE_SOURCE_DOR}/libcaf_opencl/caf)
install(DIRECTORY libcaf_opencl/caf/ DESTINATION include/caf
FILES_MATCHING PATTERN "*.hpp")
endif()
# process cmake_uninstall.cmake.in # process cmake_uninstall.cmake.in
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
...@@ -197,6 +203,12 @@ add_custom_target(uninstall ...@@ -197,6 +203,12 @@ add_custom_target(uninstall
set(LIBCAF_INCLUDE_DIRS set(LIBCAF_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/libcaf_core ${CMAKE_SOURCE_DIR}/libcaf_core
${CMAKE_SOURCE_DIR}/libcaf_io) ${CMAKE_SOURCE_DIR}/libcaf_io)
# path to caf opencl headers
if(EXISTS ${CMAKE_SOURCE_DOR}/libcaf_opencl/caf)
set(LIBCAF_INCLUDE_DIRS ${LIBCAF_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/libcaf_opencl)
endif()
# path to probe-event headers (if submodule is loaded) # path to probe-event headers (if submodule is loaded)
if(EXISTS "${CMAKE_SOURCE_DIR}/probe-event/caf") if(EXISTS "${CMAKE_SOURCE_DIR}/probe-event/caf")
set(LIBCAF_INCLUDE_DIRS set(LIBCAF_INCLUDE_DIRS
...@@ -224,6 +236,11 @@ message(STATUS "Enter subdirectory libcaf_io") ...@@ -224,6 +236,11 @@ message(STATUS "Enter subdirectory libcaf_io")
add_subdirectory(libcaf_io) add_subdirectory(libcaf_io)
# set io lib for sub directories # set io lib for sub directories
set(LIBCAF_IO_LIBRARY libcaf_io) set(LIBCAF_IO_LIBRARY libcaf_io)
# set opencl lib for sub directories if not told otherwise
if(NOT CAF_NO_OPENCL AND EXISTS "${CMAKE_SOURCE_DIR}/libcaf_opencl/caf")
message(STATUS "Enter subdirectory libcaf_opencl")
add_subdirectory(libcaf_opencl)
endif()
# tell CMake caf_io depends on caf_core # tell CMake caf_io depends on caf_core
if(CAF_BUILD_STATIC_ONLY OR CAF_BUILD_STATIC) if(CAF_BUILD_STATIC_ONLY OR CAF_BUILD_STATIC)
add_dependencies(libcaf_ioStatic libcaf_coreStatic) add_dependencies(libcaf_ioStatic libcaf_coreStatic)
...@@ -356,6 +373,7 @@ invertYesNo(CAF_NO_PROBE CAF_BUILD_PROBE) ...@@ -356,6 +373,7 @@ invertYesNo(CAF_NO_PROBE CAF_BUILD_PROBE)
invertYesNo(CAF_NO_SHELL CAF_BUILD_SHELL) invertYesNo(CAF_NO_SHELL CAF_BUILD_SHELL)
invertYesNo(CAF_NO_MEM_MANAGEMENT CAF_BUILD_MEM_MANAGEMENT) invertYesNo(CAF_NO_MEM_MANAGEMENT CAF_BUILD_MEM_MANAGEMENT)
invertYesNo(CAF_NO_BENCHMARKS CAF_BUILD_BENCHMARKS) invertYesNo(CAF_NO_BENCHMARKS CAF_BUILD_BENCHMARKS)
invertYesNo(CAF_NO_OPENCL CAF_BUILD_OPENCL)
# collect all compiler flags # collect all compiler flags
string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_BUILD_TYPE) string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_BUILD_TYPE)
set(ALL_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_BUILD_TYPE}}") set(ALL_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_BUILD_TYPE}}")
...@@ -378,6 +396,7 @@ message(STATUS ...@@ -378,6 +396,7 @@ message(STATUS
"\nBuild shell: ${CAF_BUILD_SHELL}" "\nBuild shell: ${CAF_BUILD_SHELL}"
"\nBuild probe: ${CAF_BUILD_PROBE}" "\nBuild probe: ${CAF_BUILD_PROBE}"
"\nBuild benchmarks: ${CAF_BUILD_BENCHMARKS}" "\nBuild benchmarks: ${CAF_BUILD_BENCHMARKS}"
"\nBuild opencl: ${CAF_BUILD_OPENCL}"
"\n" "\n"
"\nCXX: ${CMAKE_CXX_COMPILER}" "\nCXX: ${CMAKE_CXX_COMPILER}"
"\nCXXFLAGS: ${ALL_CXX_FLAGS}" "\nCXXFLAGS: ${ALL_CXX_FLAGS}"
......
...@@ -47,6 +47,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]... ...@@ -47,6 +47,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
--no-protobuf-examples build without Google Protobuf examples --no-protobuf-examples build without Google Protobuf examples
--no-curl-examples build without libcurl examples --no-curl-examples build without libcurl examples
--no-unit-tests build without unit tests --no-unit-tests build without unit tests
--no-opencl build without opencl
Debugging: Debugging:
--with-runtime-checks build with requirement checks at runtime --with-runtime-checks build with requirement checks at runtime
...@@ -266,6 +267,9 @@ while [ $# -ne 0 ]; do ...@@ -266,6 +267,9 @@ while [ $# -ne 0 ]; do
--no-unit-tests) --no-unit-tests)
append_cache_entry CAF_NO_UNIT_TESTS STRING yes append_cache_entry CAF_NO_UNIT_TESTS STRING yes
;; ;;
--no-opencl)
append_cache_entry CAF_NO_OPENCL STRING yes
;;
--build-static) --build-static)
append_cache_entry CAF_BUILD_STATIC STRING yes append_cache_entry CAF_BUILD_STATIC STRING yes
;; ;;
......
Subproject commit 68d43969042de7eceb202ae983bfe6a5e97e38a7
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