Set absl_propagate_cxx_std in third_party/CMakeLists
- better readability by clumping all absl related cmake vars just before adding absl subdirectory.
Change-Id: I597c5486a54ae9e4ffbcadf47bcb16a538a144f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/194904
Reviewed-by: dan sinclair <dsinclair@google.com>
Auto-Submit: Jaswant Panchumarti <jaswant.panchumarti@kitware.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jaswant Panchumarti <jaswant.panchumarti@kitware.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9d5f13..c7bfb7a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -234,9 +234,6 @@
option(TINT_CHECK_CHROMIUM_STYLE "Check for [chromium-style] issues during build" OFF)
option(TINT_RANDOMIZE_HASHES "Randomize the hash seed value to detect non-deterministic output" OFF)
-# Recommended setting for compability with future abseil releases.
-set(ABSL_PROPAGATE_CXX_STD ON)
-
set_if_not_defined(DAWN_THIRD_PARTY_DIR "${Dawn_SOURCE_DIR}/third_party" "Directory in which to find third-party dependencies.")
set_if_not_defined(DAWN_ABSEIL_DIR "${DAWN_THIRD_PARTY_DIR}/abseil-cpp" "Directory in which to find Abseil")
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index 98e2898..d60b74f 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -89,6 +89,8 @@
endif()
if (NOT TARGET libabsl)
+ # Recommended setting for compability with future abseil releases.
+ set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
message(STATUS "Dawn: using Abseil at ${DAWN_ABSEIL_DIR}")
if (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR
("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang"))