File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -16,19 +16,17 @@ 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
-
25
19
FetchContent_MakeAvailable (level-zero-loader )
26
20
FetchContent_GetProperties (level-zero-loader )
27
21
28
- # Restore original flags
29
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_BAK} " )
30
-
31
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
+
32
30
set (LEVEL_ZERO_INCLUDE_DIR
33
31
${level-zero-loader_SOURCE_DIR}/include CACHE PATH "Path to Level Zero Headers" )
34
32
endif ()
You can’t perform that action at this time.
0 commit comments