File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,21 @@ set(CMAKE_CXX_EXTENSIONS OFF)
8
8
set (CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON )
9
9
option (SYCL_ENABLE_WERROR "Treat all warnings as errors in SYCL project" OFF )
10
10
11
+ # enable all warnings by default
12
+ if (MSVC )
13
+ set (CMAKE_CXX_FLAGS "/W4 ${CMAKE_CXX_FLAGS} " )
14
+ else ()
15
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-deprecated-declarations" )
16
+ endif ()
17
+
11
18
if (SYCL_ENABLE_WERROR )
12
19
if (MSVC )
13
- set (CMAKE_CXX_FLAGS "/W4 / WX ${CMAKE_CXX_FLAGS} " )
20
+ set (CMAKE_CXX_FLAGS "/WX ${CMAKE_CXX_FLAGS} " )
14
21
add_definitions (
15
22
-wd4996 # Suppress 'function': was declared deprecated'
16
23
)
17
24
else ()
18
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Wno-deprecated-declarations " )
25
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" )
19
26
endif ()
20
27
endif ()
21
28
You can’t perform that action at this time.
0 commit comments