Skip to content

Commit

Permalink
update project version and submodules - April 2024 (#103)
Browse files Browse the repository at this point in the history
* update submodules

* update project version for upcoming release

* add check for C11 atomics support

* temporarily disable Python and Ruby testing on macos

* try the older macos-13 runner vs. disabling completely

* take the Python workflow back to macos-12

* take the Python workflow back to macos-11

* re-disable the Python workflow

* update the project version date
  • Loading branch information
bashbaug committed May 7, 2024
1 parent 2db34c2 commit 78e494f
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ jobs:
name: Exercise Python examples on ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
#os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -140,7 +141,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
#os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-13]
steps:
- uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 3.0)
set(CMAKE_CXX_STANDARD 14)

project(OpenCL-SDK
VERSION 2023.12.14
VERSION 2024.05.08
LANGUAGES
C CXX
)
Expand Down
2 changes: 1 addition & 1 deletion external/OpenCL-Headers
Submodule OpenCL-Headers updated 2 files
+304 −39 CL/cl_ext.h
+1 −2 CMakeLists.txt
24 changes: 20 additions & 4 deletions samples/core/callback/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/threads.c"
int main(void) { thrd_sleep(&(struct timespec){.tv_nsec=1}, NULL); }
")

file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/atomic.c"
"#include <stdatomic.h>
int main() { return 0; }
")

# Signature can be modernized at CMake version 3.25
try_compile(
HAS_C11_THREADS
Expand All @@ -29,7 +34,21 @@ try_compile(
C_STANDARD_REQUIRED ON
)

if (HAS_C11_THREADS)
try_compile(
HAS_C11_ATOMICS
"${CMAKE_CURRENT_BINARY_DIR}"
SOURCES "${CMAKE_CURRENT_BINARY_DIR}/atomic.c"
C_STANDARD 11
C_STANDARD_REQUIRED ON
)

if (NOT HAS_C11_THREADS)
message(WARNING
"Skipping callback sample, C11 standard threads are not supported with the current toolset")
elseif (NOT HAS_C11_ATOMICS)
message(WARNING
"Skipping callback sample, C11 standard atomics are not supported with the current toolset")
else()
add_sample(
TEST
TARGET callback
Expand All @@ -38,9 +57,6 @@ if (HAS_C11_THREADS)
KERNELS reaction_diffusion.cl)
target_link_libraries(callback PRIVATE
$<TARGET_NAME_IF_EXISTS:Threads::Threads>)
else()
message(WARNING
"Skipping callback sample, C11 standard threads are not supported with the current toolset")
endif()

add_sample(
Expand Down

0 comments on commit 78e494f

Please sign in to comment.