Skip to content

Commit 21c1fe5

Browse files
authored
Do not build CL/GL samples by default (#131)
These require many dependencies and it seems fetching the dependencies of SFML is currently broken. Better to disable them by default so first time users do not need to resolve complex dependency issues to get going. Signed-off-by: Kevin Petit <kevin.petit@arm.com>
1 parent f07c8c7 commit 21c1fe5

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/presubmit.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ jobs:
274274
-D BUILD_TESTING=ON
275275
-D BUILD_EXAMPLES=ON
276276
-D OPENCL_SDK_BUILD_SAMPLES=ON
277+
-D OPENCL_SDK_BUILD_OPENGL_SAMPLES=ON
277278
`if [[ "${{matrix.BIN}}" == "32" ]]; then echo "-D OPENCL_SDK_BUILD_OPENGL_SAMPLES=OFF"; fi;`
278279
-D OPENCL_ICD_LOADER_BUILD_TESTING=ON
279280
-D CMAKE_C_STANDARD=${{matrix.STD.C}}
@@ -499,6 +500,7 @@ jobs:
499500
-D BUILD_DOCS=ON `
500501
-D BUILD_TESTING=ON `
501502
-D OPENCL_SDK_BUILD_SAMPLES=ON `
503+
-D OPENCL_SDK_BUILD_OPENGL_SAMPLES=ON `
502504
-D CMAKE_C_STANDARD=${{matrix.STD.C}} `
503505
-D CMAKE_CXX_STANDARD=${{matrix.STD.CXX}} `
504506
-D CMAKE_C_FLAGS="${env:CMAKE_CFLAGS}" `
@@ -530,6 +532,7 @@ jobs:
530532
-D BUILD_DOCS=ON `
531533
-D BUILD_TESTING=ON `
532534
-D OPENCL_SDK_BUILD_SAMPLES=ON `
535+
-D OPENCL_SDK_BUILD_OPENGL_SAMPLES=ON `
533536
-D CMAKE_C_STANDARD=${{matrix.STD.C}} `
534537
-D CMAKE_CXX_STANDARD=${{matrix.STD.CXX}} `
535538
-D CMAKE_C_FLAGS="${env:CMAKE_CFLAGS}" `
@@ -736,6 +739,7 @@ jobs:
736739
-D BUILD_TESTING=ON
737740
-D BUILD_EXAMPLES=ON
738741
-D OPENCL_SDK_BUILD_SAMPLES=ON
742+
-D OPENCL_SDK_BUILD_OPENGL_SAMPLES=ON
739743
-D CMAKE_C_STANDARD=${{matrix.STD.C}}
740744
-D CMAKE_CXX_STANDARD=${{matrix.STD.CXX}}
741745
-D CMAKE_C_FLAGS="${CMAKE_CFLAGS}"
@@ -878,7 +882,6 @@ jobs:
878882
-D CMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake
879883
-D ANDROID_ABI=${{matrix.ABI}}
880884
-D ANDROID_PLATFORM=${{matrix.API_LEVEL}}
881-
-D OPENCL_SDK_BUILD_OPENGL_SAMPLES=OFF
882885
-S $GITHUB_WORKSPACE
883886
-B $GITHUB_WORKSPACE/build
884887

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ project(OpenCL-SDK
2525
include(CMakeDependentOption)
2626
option(OPENCL_SDK_BUILD_UTILITY_LIBRARIES "Build utility libraries" ON)
2727
cmake_dependent_option(OPENCL_SDK_BUILD_SAMPLES "Build sample code" ON OPENCL_SDK_BUILD_UTILITY_LIBRARIES OFF)
28-
cmake_dependent_option(OPENCL_SDK_BUILD_OPENGL_SAMPLES "Build OpenCL-OpenGL interop sample code" ON OPENCL_SDK_BUILD_SAMPLES OFF)
28+
cmake_dependent_option(OPENCL_SDK_BUILD_OPENGL_SAMPLES "Build OpenCL-OpenGL interop sample code" OFF OPENCL_SDK_BUILD_SAMPLES OFF)
2929
cmake_dependent_option(OPENCL_SDK_BUILD_VULKAN_SAMPLES "Build OpenCL-Vulkan interop sample code" ON OPENCL_SDK_BUILD_SAMPLES OFF)
3030
cmake_dependent_option(OPENCL_SDK_TEST_SAMPLES "Add CTest to samples (where applicable)" ON OPENCL_SDK_BUILD_SAMPLES OFF)
3131

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,8 @@ If CMake is not provided by your build system or OS package manager, please cons
6161
-B ./OpenCL-SDK/build -S ./OpenCL-SDK
6262
cmake --build ./OpenCL-SDK/build --target install
6363

64+
Samples that make use of OpenGL interop are disabled by default to reduce
65+
the number of dependencies for most users. They can be enabled using the
66+
`OPENCL_SDK_BUILD_OPENGL_SAMPLES` CMake option.
67+
6468
_(Note: on Linux, paths to dependent libraries are automatically handled by RPATH in both the build and install tree. On Windows, all DLLs have to be on the `PATH`. Vcpkg copies dependent DLLs to the build tree, but in order to do the same in the install tree, a sufficiently new CMake version is required. CMake 3.21 introduces `install(IMPORTED_RUNTIME_ARTIFACTS)`.)_

0 commit comments

Comments
 (0)