@@ -9,7 +9,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # export compile_commands.json to use with
9
9
set (CMAKE_CXX_STANDARD 17)
10
10
set (CMAKE_CXX_STANDARD_REQUIRED ON )
11
11
12
-
13
12
option (USE_LOCAL_LIBS "Use local libraries instead of fetching from the internet" OFF )
14
13
15
14
# Define paths for local and remote repositories
@@ -30,11 +29,19 @@ IF (NOT WEBGPU_TAG)
30
29
ENDIF ()
31
30
message (STATUS "Using WebGPU distribution tag: ${WEBGPU_TAG} " )
32
31
33
- IF (WEBGPU_TAG STREQUAL "dawn" )
34
- # Pin the dawn backend to a specific commit
35
- set (WEBGPU_TAG "1025b977e1927b6d0327e67352f90feb4bcf8274" )
32
+ # TODO - look into dawn version check build issue :(
33
+ # ABSL_PROPAGATE_CXX_STD
34
+ # https://github.com/google/dawn/blob/59b4421352ada94c98f0f3d63913c117378d970c/CMakeLists.txt#L246C5-L246C27
35
+
36
+ if (WEBGPU_TAG STREQUAL "dawn" )
37
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWEBGPU_BACKEND_DAWN" )
38
+ # actually use specific commit
39
+ # set(WEBGPU_TAG "1025b977e1927b6d0327e67352f90feb4bcf8274") # prev commit
40
+ # set(WEBGPU_TAG "acf972b7b909f52e183bdae3971b93bb13d4a29e") # latest commit
41
+ # add_compile_options(-UABSL_INTERNAL_AT_LEAST_CXX20)
42
+ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -UABSL_INTERNAL_AT_LEAST_CXX20")
36
43
message (STATUS "Using Dawn backend" )
37
- ENDIF ()
44
+ endif ()
38
45
39
46
FetchContent_Declare(
40
47
webgpu
@@ -44,11 +51,6 @@ FetchContent_Declare(
44
51
)
45
52
FetchContent_MakeAvailable(webgpu)
46
53
47
- if (WEBGPU_TAG STREQUAL "dawn" )
48
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWEBGPU_BACKEND_DAWN" )
49
- message (STATUS "Using Dawn backend" )
50
- endif ()
51
-
52
54
option (FASTBUILD "Option to enable fast builds" OFF )
53
55
if (FASTBUILD)
54
56
set (CMAKE_BUILD_TYPE None) # Avoid default flags of predefined build types
0 commit comments