File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -16,23 +16,19 @@ if (NOT DEFINED LEVEL_ZERO_LIBRARY OR NOT DEFINED LEVEL_ZERO_INCLUDE_DIR)
16
16
GIT_TAG ${LEVEL_ZERO_LOADER_TAG}
17
17
)
18
18
19
+ # Suppress some pedantic warnings for Level Zero build
20
+ set (CMAKE_CXX_FLAGS_BAK "${CMAKE_CXX_FLAGS} " )
21
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-variable" )
22
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pedantic" )
23
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-stringop-truncation" )
24
+
19
25
FetchContent_MakeAvailable (level-zero-loader )
20
26
FetchContent_GetProperties (level-zero-loader )
21
27
22
- set (LEVEL_ZERO_LIBRARY ze_loader )
23
-
24
- target_compile_options (${LEVEL_ZERO_LIBRARY} PRIVATE
25
- "-Wno-unused-but-set-variable"
26
- "-Wno-pedantic"
27
- "-Wno-stringop-truncation"
28
- )
29
- target_compile_options (ze_tracing_layer PRIVATE
30
- "-Wno-pedantic"
31
- )
32
- target_compile_options (ze_validation_layer PRIVATE
33
- "-Wno-pedantic"
34
- )
28
+ # Restore original flags
29
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_BAK} " )
35
30
31
+ set (LEVEL_ZERO_LIBRARY ze_loader )
36
32
set (LEVEL_ZERO_INCLUDE_DIR
37
33
${level-zero-loader_SOURCE_DIR}/include CACHE PATH "Path to Level Zero Headers" )
38
34
endif ()
You can’t perform that action at this time.
0 commit comments