llvm.org GIT mirror llvm / b935402
[CMake] Move configuration of LLVM_CXX_STD to HandleLLVMOptions.cmake Standalone builds of projects other than llvm itself (lldb, libcxx, etc) include HandleLLVMOptions but not the top level llvm CMakeLists, so we need to set this variable here to ensure that it always has a value. This should fix the build issues some folks have been seeing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357976 91177308-0d34-0410-b5e6-96231b3b80d8 Justin Bogner 6 months ago
2 changed file(s) with 10 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
425425 option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
426426 option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
427427
428 set(LLVM_CXX_STD_default "c++11")
429 # Preserve behaviour of legacy cache variables
430 if (LLVM_ENABLE_CXX1Y)
431 set(LLVM_CXX_STD_default "c++1y")
432 elseif (LLVM_ENABLE_CXX1Z)
433 set(LLVM_CXX_STD_default "c++1z")
434 endif()
435 set(LLVM_CXX_STD ${LLVM_CXX_STD_default}
436 CACHE STRING "C++ standard to use for compilation.")
437
438428 option(LLVM_ENABLE_DUMP "Enable dump functions even when assertions are disabled" OFF)
439429
440430 if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
1616 else()
1717 set(LINKER_IS_LLD_LINK FALSE)
1818 endif()
19
20 set(LLVM_CXX_STD_default "c++11")
21 # Preserve behaviour of legacy cache variables
22 if (LLVM_ENABLE_CXX1Y)
23 set(LLVM_CXX_STD_default "c++1y")
24 elseif (LLVM_ENABLE_CXX1Z)
25 set(LLVM_CXX_STD_default "c++1z")
26 endif()
27 set(LLVM_CXX_STD ${LLVM_CXX_STD_default}
28 CACHE STRING "C++ standard to use for compilation.")
1929
2030 set(LLVM_ENABLE_LTO OFF CACHE STRING "Build LLVM with LTO. May be specified as Thin or Full to use a particular kind of LTO")
2131 string(TOUPPER "${LLVM_ENABLE_LTO}" uppercase_LLVM_ENABLE_LTO)