Skip to content

Commit b22af8c

Browse files
author
Haixin Huang
authored
[Build][Bugfix] Fix build failed when GC_ENABLE_DNNL=ON (#222)
* fix cmake issue * fix GENERATOR_FLAG not exist edge case
1 parent dd1a80d commit b22af8c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmake/onednn.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ if (NOT DEFINED GC_DNNL_INCLUDES)
1818
# This allows to generate headers from *.in without adding the library to the build.
1919
# If the build is required, remove this and the SKIP_ADD option above.
2020
if (DEFINED CMAKE_GENERATOR)
21-
set(GENERATOR_FLAG "-G ${CMAKE_GENERATOR}")
21+
set(GENERATOR_OPTION "-G")
22+
set(GENERATOR_FLAG "${CMAKE_GENERATOR}")
2223
endif ()
23-
execute_process(COMMAND ${CMAKE_COMMAND} ${GENERATOR_FLAG}
24+
execute_process(COMMAND ${CMAKE_COMMAND} ${GENERATOR_OPTION} ${GENERATOR_FLAG}
2425
-Wno-dev
2526
-S ${dnnl_SOURCE_DIR}
2627
-B ${dnnl_BINARY_DIR}

0 commit comments

Comments
 (0)