Skip to content

Commit 8d1f758

Browse files
committed
Do not set CMAKE_CXX_STANDARD as CACHE
Signed-off-by: Letu Ren <fantasquex@gmail.com>
1 parent 1c2bfc1 commit 8d1f758

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ endif()
1717
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1818

1919
project(IREE ASM C CXX)
20+
# If we find that the cache contains CMAKE_CXX_STANDARD it means that it's a old CMakeCache.txt
21+
# and we can just inform the user and then reset it.
22+
if($CACHE{CMAKE_CXX_STANDARD})
23+
message(WARNING "Unsetting cache value for CMAKE_CXX_STANDARD")
24+
unset(CMAKE_CXX_STANDARD CACHE)
25+
endif()
2026
set(CMAKE_C_STANDARD 11)
2127
set(CMAKE_CXX_STANDARD 17)
22-
# LLVM defines this as a CACHE property and uses a policy that causes the
23-
# cache value to take precedence. This is causing us to mix 17/14 across
24-
# the boundary.
25-
# TODO: Remove this once the LLVM mechanism is updated. See:
26-
# https://discourse.llvm.org/t/important-new-toolchain-requirements-to-build-llvm-will-most-likely-be-landing-within-a-week-prepare-your-buildbots/61447/9
27-
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to" FORCE)
2828
set(IREE_IDE_FOLDER IREE)
2929
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
3030

0 commit comments

Comments
 (0)