summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
diff options
context:
space:
mode:
authorChris Bieneman <chris.bieneman@me.com>2018-08-22 18:40:24 +0000
committerChris Bieneman <chris.bieneman@me.com>2018-08-22 18:40:24 +0000
commitdc622702aa2c25a3a01acbdbbb3be806daf9f77a (patch)
treee6b387f474762db4fc241f2ad1ce00e317bc7659 /llvm/cmake
parent87f78cfe15055f5ddc1756b65bb5ef6e0013153a (diff)
downloadbcm5719-llvm-dc622702aa2c25a3a01acbdbbb3be806daf9f77a.tar.gz
bcm5719-llvm-dc622702aa2c25a3a01acbdbbb3be806daf9f77a.zip
[CMake] Use LLVM_ENABLE_IDE instead of CMAKE_CONFIGURATION_TYPES
There are several places where we use CMAKE_CONFIGURATION_TYPES to determine if we are using an IDE generator and in turn decide not to generate some of the convenience targets (like all the install-* and check-llvm-* targets). This decision is made because IDEs don't always deal well with the thousands of targets LLVM can generate. This approach does not work for Visual Studio 15's new CMake integration. Because VS15 uses a Ninja generator, it isn't a multi-configuration build, and generating all these extra targets mucks up the UI and adds little value. With this change we still don't generate these targets by default for Visual Studio and Xcode generators, and LLVM_ENABLE_IDE becomes a switch that can be enabled on the VS15 CMake builds, to improve the IDE experience. llvm-svn: 340435
Diffstat (limited to 'llvm/cmake')
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake12
-rw-r--r--llvm/cmake/modules/CMakeLists.txt2
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index b68de99e1f3..aec0e5608d3 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -659,7 +659,7 @@ macro(add_llvm_library name)
${install_type} DESTINATION ${install_dir}
COMPONENT ${name})
- if (NOT CMAKE_CONFIGURATION_TYPES)
+ if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-${name}
DEPENDS ${name}
COMPONENT ${name})
@@ -890,7 +890,7 @@ macro(add_llvm_tool name)
RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}
COMPONENT ${name})
- if (NOT CMAKE_CONFIGURATION_TYPES)
+ if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-${name}
DEPENDS ${name}
COMPONENT ${name})
@@ -928,7 +928,7 @@ macro(add_llvm_utility name)
install (TARGETS ${name}
RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR}
COMPONENT ${name})
- if (NOT CMAKE_CONFIGURATION_TYPES)
+ if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-${name}
DEPENDS ${name}
COMPONENT ${name})
@@ -1378,7 +1378,7 @@ function(add_lit_testsuite target comment)
endfunction()
function(add_lit_testsuites project directory)
- if (NOT CMAKE_CONFIGURATION_TYPES)
+ if (NOT LLVM_ENABLE_IDE)
cmake_parse_arguments(ARG "" "" "PARAMS;DEPENDS;ARGS" ${ARGN})
# Search recursively for test directories by assuming anything not
@@ -1437,7 +1437,7 @@ function(llvm_install_library_symlink name dest type)
CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
COMPONENT ${component})
- if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE)
+ if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
add_llvm_install_targets(install-${name}
DEPENDS ${name} ${dest} install-${dest}
COMPONENT ${name})
@@ -1470,7 +1470,7 @@ function(llvm_install_symlink name dest)
CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
COMPONENT ${component})
- if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE)
+ if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
add_llvm_install_targets(install-${name}
DEPENDS ${name} ${dest} install-${dest}
COMPONENT ${name})
diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
index 6c316a2f04f..f5cc0006fa0 100644
--- a/llvm/cmake/modules/CMakeLists.txt
+++ b/llvm/cmake/modules/CMakeLists.txt
@@ -132,7 +132,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
PATTERN LLVM-Config.cmake EXCLUDE
PATTERN GetHostTriple.cmake EXCLUDE)
- if (NOT CMAKE_CONFIGURATION_TYPES)
+ if (NOT LLVM_ENABLE_IDE)
# Add a dummy target so this can be used with LLVM_DISTRIBUTION_COMPONENTS
add_custom_target(cmake-exports)
add_llvm_install_targets(install-cmake-exports
OpenPOWER on IntegriCloud