File tree Expand file tree Collapse file tree 5 files changed +41
-8
lines changed Expand file tree Collapse file tree 5 files changed +41
-8
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ jobs:
103103 cmake -G Ninja \
104104 -DCUTLASS_ENABLE_SYCL=ON \
105105 -DDPCPP_SYCL_TARGET=${{ matrix.sycl_target }} \
106+ -DCMAKE_CXX_FLAGS="-Werror" \
106107 -DCUTLASS_SYCL_RUNNING_CI=ON
107108 cmake --build .
108109 - name : Unit test
Original file line number Diff line number Diff line change 8484 -DCUTLASS_ENABLE_SYCL=ON \
8585 -DDPCPP_SYCL_TARGET=${{ matrix.sycl_target }} \
8686 -DCUTLASS_SYCL_RUNNING_CI=ON \
87+ -DCMAKE_CXX_FLAGS="-Werror" \
8788 -DDPCPP_HOST_COMPILER=g++-13
8889 cmake --build .
8990
Original file line number Diff line number Diff line change 2828
2929if (CUTLASS_ENABLE_SYCL)
3030 cmake_minimum_required (VERSION 3.22 FATAL_ERROR)
31+
32+ # Silence warnings from GoogleTest headers
33+ include_directories (SYSTEM
34+ ${CMAKE_CURRENT_SOURCE_DIR} /_deps/googletest-src/googletest/include
35+ ${CMAKE_CURRENT_SOURCE_DIR} /_deps/googletest-src/googlemock/include
36+ )
37+
38+ # Silence warnings from GoogleBenchmark headers
39+ include_directories (SYSTEM
40+ ${CMAKE_CURRENT_SOURCE_DIR} /_deps/googlebenchmark-src/include
41+ )
42+
3143else ()
3244 cmake_minimum_required (VERSION 3.19 FATAL_ERROR)
3345 cmake_policy (SET CMP0112 NEW)
@@ -121,6 +133,16 @@ if (CUTLASS_ENABLE_SYCL)
121133 DPCPP_SYCL_TARGET STREQUAL "intel_gpu_bmg_g21" )
122134 set (SYCL_INTEL_TARGET ON )
123135 add_compile_definitions (SYCL_INTEL_TARGET)
136+ add_compile_options (-Wall
137+ -Wno-unused-variable
138+ -Wno-unused-local-typedef
139+ -Wno-unused-but-set-variable
140+ -Wno-uninitialized
141+ -Wno-reorder-ctor
142+ -Wno-logical-op-parentheses
143+ -Wno-unused-function
144+ -Wno-unknown-pragmas
145+ )
124146 endif ()
125147
126148 add_compile_definitions (CUTLASS_ENABLE_SYCL)
Original file line number Diff line number Diff line change @@ -45,4 +45,13 @@ FetchContent_Declare(
4545
4646FetchContent_MakeAvailable(googlebenchmark)
4747
48+ # Silence warnings from GoogleBenchmark sources
49+ if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM" )
50+ foreach (tgt benchmark benchmark_main)
51+ if (TARGET ${tgt} )
52+ target_compile_options (${tgt} PRIVATE -w)
53+ endif ()
54+ endforeach ()
55+ endif ()
56+
4857set (BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ FetchContent_Declare(
4444
4545FetchContent_MakeAvailable(googletest)
4646
47- if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM" )
48- if ( TARGET gtest )
49- # Ignore unsupported warning flags on IntelLLVM
50- target_compile_options (gtest PRIVATE -Wno-unknown-warning-option )
51- # Show -Winline warnings, but don’t let them become errors
52- target_compile_options (gtest PRIVATE -Wno-error=inline )
53- endif ()
47+ # Silence warnings from GoogleTest sources
48+ if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM" )
49+ foreach (tgt gtest gtest_main gmock gmock_main)
50+ if ( TARGET ${tgt} )
51+ target_compile_options ( ${tgt} PRIVATE -w)
52+ endif ( )
53+ endforeach ()
5454endif ()
5555
5656if (MSVC )
5757 set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
58- endif ()
58+ endif ()
You can’t perform that action at this time.
0 commit comments