CMake cleanup

This CL cleans up the main CMakeLists.txt file by grouping the option
entries together, this makes it clearer which options are available.

The dawn options are emitted as status messages so you can see how
everything was configured.

The Tint readers are configured based on the dawn backend being
configured.

Change-Id: I9f1e3012dab6367307783af5cf3bca38beac3382
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94300
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
dan sinclair
2022-06-21 17:54:03 +00:00
committed by Dawn LUCI CQ
parent 79e90e5f3b
commit 194c1776d3
3 changed files with 145 additions and 129 deletions

View File

@@ -122,6 +122,13 @@ if [ "$BUILD_SYSTEM" == "cmake" ]; then
COMMON_CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=${BUILD_TYPE}"
COMMON_CMAKE_FLAGS+=" -DTINT_DOCS_WARN_AS_ERROR=1"
COMMON_CMAKE_FLAGS+=" -DTINT_BUILD_BENCHMARKS=1"
COMMON_CMAKE_FLAGS+=" -DTINT_BUILD_SPV_READER=1"
COMMON_CMAKE_FLAGS+=" -DTINT_BUILD_WGSL_READER=1"
COMMON_CMAKE_FLAGS+=" -DTINT_BUILD_GLSL_WRITER=1"
COMMON_CMAKE_FLAGS+=" -DTINT_BUILD_HLSL_WRITER=1"
COMMON_CMAKE_FLAGS+=" -DTINT_BUILD_MSL_WRITER=1"
COMMON_CMAKE_FLAGS+=" -DTINT_BUILD_SPV_WRITER=1"
COMMON_CMAKE_FLAGS+=" -DTINT_BUILD_WGSL_WRITER=1"
if [ "$BUILD_TOOLCHAIN" == "clang" ]; then
using clang-10.0.0

View File

@@ -116,7 +116,7 @@ call :status "Configuring build system"
@echo on
mkdir %BUILD_DIR%
cd /d %BUILD_DIR%
set COMMON_CMAKE_FLAGS=-DTINT_BUILD_DOCS=O -DTINT_BUILD_BENCHMARKS=1 -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
set COMMON_CMAKE_FLAGS=-DTINT_BUILD_DOCS=O -DTINT_BUILD_BENCHMARKS=1 -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DTINT_BUILD_BENCHMARKS=1 -DTINT_BUILD_SPV_READER=1 -DTINT_BUILD_WGSL_READER=1 -DTINT_BUILD_GLSL_WRITER=1 -DTINT_BUILD_HLSL_WRITER=1 -DTINT_BUILD_MSL_WRITER=1 -DTINT_BUILD_SPV_WRITER=1 -DTINT_BUILD_WGSL_WRITER=1
@echo off
call :status "Building dawn"