Author: stefan.graenitz Date: Fri May 17 12:19:41 2019 New Revision: 361069
URL: http://llvm.org/viewvc/llvm-project?rev=361069&view=rev Log: [CMake] Add first CMake cache files Summary: CMake cache scripts pre-populate the CMakeCache in a build directory with commonly used settings. The CMake invocation from D61952 could look like this: ``` cmake -G Ninja -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-osx.cmake -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;lldb" ../llvm-project/llvm ``` Options specified on the command line will override options in the cache files (as long as caches don't use `FORCE`). What do you think? (This is a first proposal and not set in stone.) Reviewers: xiaobai, compnerd, JDevlieghere, aprantl, labath Subscribers: mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D61956 Added: lldb/trunk/cmake/caches/ lldb/trunk/cmake/caches/Apple-lldb-base.cmake lldb/trunk/cmake/caches/Apple-lldb-macOS.cmake Added: lldb/trunk/cmake/caches/Apple-lldb-base.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/caches/Apple-lldb-base.cmake?rev=361069&view=auto ============================================================================== --- lldb/trunk/cmake/caches/Apple-lldb-base.cmake (added) +++ lldb/trunk/cmake/caches/Apple-lldb-base.cmake Fri May 17 12:19:41 2019 @@ -0,0 +1,8 @@ +set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "") +set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "") + +# Release builds set these explicitly: +#set(LLDB_VERSION_MAJOR 9999 CACHE STRING "") +#set(LLDB_VERSION_MINOR 9 CACHE STRING "") +#set(LLDB_VERSION_PATCH 9 CACHE STRING "") +#set(LLDB_VERSION_SUFFIX git CACHE STRING "") Added: lldb/trunk/cmake/caches/Apple-lldb-macOS.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/caches/Apple-lldb-macOS.cmake?rev=361069&view=auto ============================================================================== --- lldb/trunk/cmake/caches/Apple-lldb-macOS.cmake (added) +++ lldb/trunk/cmake/caches/Apple-lldb-macOS.cmake Fri May 17 12:19:41 2019 @@ -0,0 +1,22 @@ +include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake) + +set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "") +set(LLDB_NO_INSTALL_DEFAULT_RPATH ON CACHE BOOL "") + +# Set the install prefix to the default install location on the enduser machine. +# If the location is not writeable on the build machine, specify another prefix +# in the DESTDIR environment variable, e.g.: DESTDIR=/tmp ninja install +set(CMAKE_INSTALL_PREFIX /Applications/Xcode.app/Contents/Developer/usr CACHE STRING "") + +# Choose the install location for LLDB.framework so that it matches the +# INSTALL_RPATH of the lldb driver. It's either absolute or relative to +# CMAKE_INSTALL_PREFIX. In any case, DESTDIR will be an extra prefix. +set(LLDB_FRAMEWORK_INSTALL_DIR /Applications/Xcode.app/Contents/SharedFrameworks CACHE STRING "") + +# Release builds may change these: +set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "") +set(LLDB_USE_SYSTEM_DEBUGSERVER ON CACHE BOOL "") +set(LLVM_EXTERNALIZE_DEBUGINFO OFF CACHE BOOL "") + +set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "") +set(LLVM_ENABLE_MODULES ON CACHE BOOL "") _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits