summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2019-02-20 23:08:43 +0000
committerShoaib Meenai <smeenai@fb.com>2019-02-20 23:08:43 +0000
commite4455cea71c114b15ac657ef391053bda38d1b2f (patch)
tree2f9dcc2c82a9a604963c7de67df97de3899f28c5
parent003a5a6ba21122a6437ec85f5f24f01c2989c4d7 (diff)
downloadclang-e4455cea71c114b15ac657ef391053bda38d1b2f.tar.gz
[clang] Switch to LLVM_ENABLE_IDE
r344555 switched LLVM to guarding install targets with LLVM_ENABLE_IDE instead of CMAKE_CONFIGURATION_TYPES, which expresses the intent more directly and can be overridden by a user. Make the corresponding change in clang. LLVM_ENABLE_IDE is computed by HandleLLVMOptions, so it should be available for both standalone and integrated builds. Differential Revision: https://reviews.llvm.org/D58284 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354525 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt4
-rw-r--r--cmake/modules/AddClang.cmake4
-rw-r--r--lib/Headers/CMakeLists.txt2
-rw-r--r--tools/c-index-test/CMakeLists.txt2
-rw-r--r--tools/diagtool/CMakeLists.txt2
-rw-r--r--tools/libclang/CMakeLists.txt4
6 files changed, 9 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f74837c1ae..8d43ec90e1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -552,7 +552,7 @@ endif()
add_custom_target(clang-libraries)
set_target_properties(clang-libraries PROPERTIES FOLDER "Misc")
-if(NOT CMAKE_CONFIGURATION_TYPES)
+if(NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-clang-libraries
DEPENDS clang-libraries
COMPONENT clang-libraries)
@@ -563,7 +563,7 @@ if(CLANG_LIBS)
list(REMOVE_DUPLICATES CLANG_LIBS)
foreach(lib ${CLANG_LIBS})
add_dependencies(clang-libraries ${lib})
- if(NOT CMAKE_CONFIGURATION_TYPES)
+ if(NOT LLVM_ENABLE_IDE)
add_dependencies(install-clang-libraries install-${lib})
endif()
endforeach()
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
index 4c3f2d19f7..d225d2ecaa 100644
--- a/cmake/modules/AddClang.cmake
+++ b/cmake/modules/AddClang.cmake
@@ -103,7 +103,7 @@ macro(add_clang_library name)
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
RUNTIME DESTINATION bin)
- if (NOT CMAKE_CONFIGURATION_TYPES)
+ if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-${name}
DEPENDS ${name}
COMPONENT ${name})
@@ -147,7 +147,7 @@ macro(add_clang_tool name)
RUNTIME DESTINATION bin
COMPONENT ${name})
- if(NOT CMAKE_CONFIGURATION_TYPES)
+ if(NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-${name}
DEPENDS ${name}
COMPONENT ${name})
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
index e444c9c870..27520334a8 100644
--- a/lib/Headers/CMakeLists.txt
+++ b/lib/Headers/CMakeLists.txt
@@ -178,7 +178,7 @@ install(
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include/cuda_wrappers)
-if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's.
+if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-clang-headers
DEPENDS clang-headers
COMPONENT clang-headers)
diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt
index 53e3421f1b..ceef4b0863 100644
--- a/tools/c-index-test/CMakeLists.txt
+++ b/tools/c-index-test/CMakeLists.txt
@@ -61,7 +61,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
RUNTIME DESTINATION "${INSTALL_DESTINATION}"
COMPONENT c-index-test)
- if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's.
+ if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-c-index-test
DEPENDS c-index-test
COMPONENT c-index-test)
diff --git a/tools/diagtool/CMakeLists.txt b/tools/diagtool/CMakeLists.txt
index 96d1c39024..80d787b12f 100644
--- a/tools/diagtool/CMakeLists.txt
+++ b/tools/diagtool/CMakeLists.txt
@@ -23,7 +23,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
COMPONENT diagtool
RUNTIME DESTINATION bin)
- if (NOT CMAKE_CONFIGURATION_TYPES)
+ if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-diagtool
DEPENDS diagtool
COMPONENT diagtool)
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
index 6fbf1acf8f..853b5e6e0e 100644
--- a/tools/libclang/CMakeLists.txt
+++ b/tools/libclang/CMakeLists.txt
@@ -149,7 +149,7 @@ install(DIRECTORY ../../include/clang-c
add_custom_target(libclang-headers)
set_target_properties(libclang-headers PROPERTIES FOLDER "Misc")
-if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's.
+if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-libclang-headers
COMPONENT libclang-headers)
endif()
@@ -165,7 +165,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
DESTINATION
"lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
endforeach()
-if(NOT CMAKE_CONFIGURATION_TYPES)
+if(NOT LLVM_ENABLE_IDE)
add_custom_target(libclang-python-bindings)
add_llvm_install_targets(install-libclang-python-bindings
COMPONENT