diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-06-23 07:02:53 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-06-23 07:02:53 +0000 |
commit | 4f81c24064e1e6c024cc319fe79a980f047c5379 (patch) | |
tree | 0b912fa0ad55b8887ff2ee81b6f37ca58e98789c /CMakeLists.txt | |
parent | a2adf70d4980d57acebfacb7dbe6277d499464a9 (diff) | |
parent | 60fb80957aa43bf92e419955bc6e2e57da5a2f74 (diff) | |
download | amber-4f81c24064e1e6c024cc319fe79a980f047c5379.tar.gz |
Snap for 11992377 from 60fb80957aa43bf92e419955bc6e2e57da5a2f74 to busytown-mac-infra-releasebusytown-mac-infra-release
Change-Id: I3b0c071e470876e1e2d3ddfb7e0e7811e7b9dbc3
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c064649..66fb14b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,13 +47,17 @@ option(AMBER_USE_LOCAL_VULKAN "Build with vulkan in third_party" OFF) option(AMBER_USE_CLSPV "Build with Clspv support" OFF) option(AMBER_ENABLE_SWIFTSHADER "Build using SwiftShader" ${AMBER_ENABLE_SWIFTSHADER}) -option(AMBER_ENABLE_VK_DEBUGGING - "Build with cppdap debugging support" ${AMBER_ENABLE_VK_DEBUGGING}) option(AMBER_ENABLE_RTTI "Build with runtime type information" OFF) +option(AMBER_DISABLE_WERROR "Build without the -Werror flag" ${AMBER_DISABLE_WERROR}) +option(AMBER_DISABLE_WEVERYTHING "Build without the -Weverything flag" ${AMBER_DISABLE_WEVERYTHING}) + +if (${AMBER_ENABLE_VK_DEBUGGING}) + message(FATAL_ERROR "Amber no longer supports Vulkan debugging") +endif() if (${AMBER_USE_CLSPV} OR ${AMBER_ENABLE_SWIFTSHADER}) - set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD 17) else() set(CMAKE_CXX_STANDARD 11) endif() @@ -153,7 +157,6 @@ add_definitions(-DAMBER_ENABLE_SHADERC=$<BOOL:${AMBER_ENABLE_SHADERC}>) add_definitions(-DAMBER_ENABLE_DXC=$<BOOL:${AMBER_ENABLE_DXC}>) add_definitions(-DAMBER_ENABLE_CLSPV=$<BOOL:${AMBER_ENABLE_CLSPV}>) add_definitions(-DAMBER_ENABLE_LODEPNG=$<BOOL:${AMBER_ENABLE_LODEPNG}>) -add_definitions(-DAMBER_ENABLE_VK_DEBUGGING=$<BOOL:${AMBER_ENABLE_VK_DEBUGGING}>) add_definitions(-DAMBER_ENABLE_RTTI=$<BOOL:${AMBER_ENABLE_RTTI}>) set(CMAKE_DEBUG_POSTFIX "") @@ -205,13 +208,16 @@ function(amber_default_compile_options TARGET) -fno-exceptions -fvisibility=hidden -Wall - -Werror -Wextra + -Wno-cast-function-type-strict -Wno-padded -Wno-switch-enum -Wno-unknown-pragmas -pedantic-errors ) + if (NOT ${AMBER_DISABLE_WERROR}) + target_compile_options(${TARGET} PRIVATE -Werror) + endif() if(NOT ${AMBER_ENABLE_RTTI}) target_compile_options(${TARGET} PRIVATE -fno-rtti) @@ -223,8 +229,10 @@ function(amber_default_compile_options TARGET) -Wno-c++98-compat-pedantic -Wno-format-pedantic -Wno-unknown-warning-option - -Weverything ) + if (NOT ${AMBER_DISABLE_WEVERYTHING}) + target_compile_options(${TARGET} PRIVATE -Weverything) + endif() endif() endif() |