mirror of
https://github.com/uxlfoundation/oneDNN.git
synced 2025-10-20 18:43:49 +08:00
build: enable Wundef
This commit is contained in:
committed by
Dmitry Zarukin
parent
a21297e5d3
commit
1c825b46bb
@ -53,6 +53,10 @@ endif()
|
|||||||
# the macros to avoid code duplication and ensure consistency.
|
# the macros to avoid code duplication and ensure consistency.
|
||||||
macro(platform_unix_and_mingw_common_ccxx_flags var)
|
macro(platform_unix_and_mingw_common_ccxx_flags var)
|
||||||
append(${var} "-Wall -Wno-unknown-pragmas")
|
append(${var} "-Wall -Wno-unknown-pragmas")
|
||||||
|
# TODO: remove Aarch64 limitation when ACL hits are resolved.
|
||||||
|
if(NOT DNNL_TARGET_ARCH STREQUAL "AARCH64")
|
||||||
|
append(${var} "-Wundef")
|
||||||
|
endif()
|
||||||
append_if(DNNL_WERROR ${var} "-Werror")
|
append_if(DNNL_WERROR ${var} "-Werror")
|
||||||
append(${var} "-fvisibility=internal")
|
append(${var} "-fvisibility=internal")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
2
third_party/gtest/CMakeLists.txt
vendored
2
third_party/gtest/CMakeLists.txt
vendored
@ -6,6 +6,8 @@ if(WIN32 AND DNNL_WITH_SYCL)
|
|||||||
append(CMAKE_CXX_FLAGS "-Wno-ignored-attributes")
|
append(CMAKE_CXX_FLAGS "-Wno-ignored-attributes")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
string(REGEX REPLACE "-Wundef" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
|
|
||||||
set(TARGET_NAME dnnl_gtest)
|
set(TARGET_NAME dnnl_gtest)
|
||||||
set(MAIN_SRC "src/gtest-all.cc")
|
set(MAIN_SRC "src/gtest-all.cc")
|
||||||
source_group("" FILES ${MAIN_SRC})
|
source_group("" FILES ${MAIN_SRC})
|
||||||
|
Reference in New Issue
Block a user