mirror of
https://github.com/RPCSX/SPIRV-Tools.git
synced 2025-03-05 01:37:48 +00:00
Use NEW behavior for policy CMP0054.
The NEW behavior is to not dereference variables or interpret keywords that have been quoted or bracketed. For more information, see https://cmake.org/cmake/help/v3.1/policy/CMP0054.html. This is to suppress a warning when using CMake 3.1.3+.
This commit is contained in:
parent
816f29805b
commit
190b0d3162
@ -25,6 +25,13 @@
|
|||||||
# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8.12)
|
cmake_minimum_required(VERSION 2.8.12)
|
||||||
|
if (POLICY CMP0054)
|
||||||
|
# Avoid dereferencing variables or interpret keywords that have been
|
||||||
|
# quoted or bracketed.
|
||||||
|
# https://cmake.org/cmake/help/v3.1/policy/CMP0054.html
|
||||||
|
cmake_policy(SET CMP0054 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
project(spirv-tools)
|
project(spirv-tools)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
set(SPIRV_TOOLS "SPIRV-Tools")
|
set(SPIRV_TOOLS "SPIRV-Tools")
|
||||||
@ -49,7 +56,7 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(SPIRV_WERROR "Enable error on warning" ON)
|
option(SPIRV_WERROR "Enable error on warning" ON)
|
||||||
if((${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") OR (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang"))
|
if(("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
|
||||||
set(COMPILER_IS_LIKE_GNU TRUE)
|
set(COMPILER_IS_LIKE_GNU TRUE)
|
||||||
endif()
|
endif()
|
||||||
if(${COMPILER_IS_LIKE_GNU})
|
if(${COMPILER_IS_LIKE_GNU})
|
||||||
|
@ -51,7 +51,7 @@ function(add_spvtools_unittest)
|
|||||||
if(${COMPILER_IS_LIKE_GNU})
|
if(${COMPILER_IS_LIKE_GNU})
|
||||||
target_compile_options(${ARG_TARGET} PRIVATE -Wno-undef)
|
target_compile_options(${ARG_TARGET} PRIVATE -Wno-undef)
|
||||||
endif()
|
endif()
|
||||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
# Disable C4503 "decorated name length exceeded" warning,
|
# Disable C4503 "decorated name length exceeded" warning,
|
||||||
# triggered by some heavily templated types.
|
# triggered by some heavily templated types.
|
||||||
# We don't care much about that in test code.
|
# We don't care much about that in test code.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user