summaryrefslogtreecommitdiff
path: root/lld/CMakeLists.txt
diff options
context:
space:
mode:
authorJez Ng <jezng@fb.com>2022-02-22 18:14:47 -0500
committerJez Ng <jezng@fb.com>2022-02-22 18:15:29 -0500
commit606cb8548a1b7763e0c8489c5efe66803a7ede72 (patch)
tree75e15475c80bd5098aae26e4bc3705bb7cd0a4da /lld/CMakeLists.txt
parented4f0cb87878e63378f2a37a2af2b538eb493a04 (diff)
downloadllvm-606cb8548a1b7763e0c8489c5efe66803a7ede72.tar.gz
[lld] Require C++14 in LLD standalone build
This is what the Clang standalone build does too. And setting this seems to be required to get the standalone build to work on my Mac. Reviewed By: #lld-macho, MaskRay, Ericson2314, smeenai Differential Revision: https://reviews.llvm.org/D120269
Diffstat (limited to 'lld/CMakeLists.txt')
-rw-r--r--lld/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index 9bcc135665d0..f51c864af837 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -11,6 +11,10 @@ endif()
include(GNUInstallDirs)
if(LLD_BUILT_STANDALONE)
+ set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
+ set(CMAKE_CXX_STANDARD_REQUIRED YES)
+ set(CMAKE_CXX_EXTENSIONS NO)
+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Rely on llvm-config.