[llvm] r260154 - cmake: Use "set" instead of "option" for LLVM_ENABLE_LTO

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 13:55:20 PST 2016


Author: bogner
Date: Mon Feb  8 15:55:19 2016
New Revision: 260154

URL: http://llvm.org/viewvc/llvm-project?rev=260154&view=rev
Log:
cmake: Use "set" instead of "option" for LLVM_ENABLE_LTO

Apparently option is for bools and cmake-gui will display this
strangely with option.

Pointed out by edward-san - thanks!

Modified:
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=260154&r1=260153&r2=260154&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Mon Feb  8 15:55:19 2016
@@ -656,7 +656,7 @@ append_if(LLVM_BUILD_INSTRUMENTED "-fpro
   CMAKE_EXE_LINKER_FLAGS
   CMAKE_SHARED_LINKER_FLAGS)
 
-option(LLVM_ENABLE_LTO "Build LLVM with LTO. May be specified as Thin or Full to use a particular kind of LTO" OFF)
+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")
 string(TOUPPER "${LLVM_ENABLE_LTO}" uppercase_LLVM_ENABLE_LTO)
 if(uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
   append("-flto=thin" CMAKE_CXX_FLAGS CMAKE_C_FLAGS




More information about the llvm-commits mailing list