r274179 - [ClangConfig] Unset some variables after we are done using them to configure ClangConfig.cmake.in files.
Michael Gottesman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 29 14:59:21 PDT 2016
Author: mgottesman
Date: Wed Jun 29 16:59:20 2016
New Revision: 274179
URL: http://llvm.org/viewvc/llvm-project?rev=274179&view=rev
Log:
[ClangConfig] Unset some variables after we are done using them to configure ClangConfig.cmake.in files.
This ensures that the values do not bleed over in between computations. It may
make sense in the future to just refactor this code into functions to provide
"true scoping".
Modified:
cfe/trunk/cmake/modules/CMakeLists.txt
Modified: cfe/trunk/cmake/modules/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/cmake/modules/CMakeLists.txt?rev=274179&r1=274178&r2=274179&view=diff
==============================================================================
--- cfe/trunk/cmake/modules/CMakeLists.txt (original)
+++ cfe/trunk/cmake/modules/CMakeLists.txt Wed Jun 29 16:59:20 2016
@@ -14,6 +14,8 @@ configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ClangConfig.cmake.in
${clang_cmake_builddir}/ClangConfig.cmake
@ONLY)
+set(CLANG_CONFIG_CMAKE_DIR)
+set(CLANG_CONFIG_EXPORTS_FILE)
# Generate ClangConfig.cmake for the install tree.
set(CLANG_CONFIG_CODE "
@@ -32,6 +34,9 @@ configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ClangConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ClangConfig.cmake
@ONLY)
+set(CLANG_CONFIG_CODE)
+set(CLANG_CONFIG_CMAKE_DIR)
+set(CLANG_CONFIG_EXPORTS_FILE)
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR})
More information about the cfe-commits
mailing list