summaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorDan Liew <dan@su-root.co.uk>2018-06-27 12:56:34 +0000
committerDan Liew <dan@su-root.co.uk>2018-06-27 12:56:34 +0000
commit1747733b229fdae42c9decc743bd6e9af5e4df46 (patch)
tree6445f9b87b6b619ec7628db72524f7db1d33ab46 /cmake/Modules
parent4220bb4e7b04b09bef542d1db0d39f5d693c3811 (diff)
[CMake] Tidy up the organisation of compiler-rt when configured as a standalone
build with an IDE (e.g. Xcode) as the generator. Previously the global `USE_FOLDERS` property wasn't set in standalone builds leading to existing settings of FOLDER not being respected. In addition to this there were several targets that appeared at the top level that were not interesting and clustered up the view. These have been changed to be displayed in "Compiler-RT Misc". Now when an Xcode project is generated from a standalone compiler-rt build the project navigator is much less cluttered. The interesting libraries should appear in "Compiler-RT Libraries" in the IDE. Differential Revision: https://reviews.llvm.org/D48378 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@335728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/AddCompilerRT.cmake4
-rw-r--r--cmake/Modules/CompilerRTDarwinUtils.cmake2
-rw-r--r--cmake/Modules/SanitizerUtils.cmake3
3 files changed, 8 insertions, 1 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index be5b81f05..d2f314a44 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -204,6 +204,8 @@ function(add_compiler_rt_runtime name type)
# If the parent targets aren't created we should create them
if(NOT TARGET ${LIB_PARENT_TARGET})
add_custom_target(${LIB_PARENT_TARGET})
+ set_target_properties(${LIB_PARENT_TARGET} PROPERTIES
+ FOLDER "Compiler-RT Misc")
endif()
if(NOT TARGET install-${LIB_PARENT_TARGET})
# The parent install target specifies the parent component to scrape up
@@ -500,6 +502,7 @@ macro(add_custom_libcxx name prefix)
COMMENT "Clobbering ${name} build and stamp directories"
USES_TERMINAL
)
+ set_target_properties(${name}-clear PROPERTIES FOLDER "Compiler-RT Misc")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp
@@ -512,6 +515,7 @@ macro(add_custom_libcxx name prefix)
add_custom_target(${name}-clobber
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp)
+ set_target_properties(${name}-clobber PROPERTIES FOLDER "Compiler-RT Misc")
set(PASSTHROUGH_VARIABLES
CMAKE_C_COMPILER_TARGET
diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
index d9214c071..04cc95598 100644
--- a/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -230,6 +230,7 @@ macro(darwin_add_builtin_library name suffix)
list(APPEND ${LIB_OS}_${suffix}_libs ${libname})
list(APPEND ${LIB_OS}_${suffix}_lipo_flags -arch ${arch} $<TARGET_FILE:${libname}>)
+ set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Libraries")
endmacro()
function(darwin_lipo_libs name)
@@ -251,6 +252,7 @@ function(darwin_lipo_libs name)
add_dependencies(${LIB_PARENT_TARGET} ${name})
install(FILES ${LIB_OUTPUT_DIR}/lib${name}.a
DESTINATION ${LIB_INSTALL_DIR})
+ set_target_properties(${name} PROPERTIES FOLDER "Compiler-RT Misc")
else()
message(WARNING "Not generating lipo target for ${name} because no input libraries exist.")
endif()
diff --git a/cmake/Modules/SanitizerUtils.cmake b/cmake/Modules/SanitizerUtils.cmake
index 9d029337b..f5dffb363 100644
--- a/cmake/Modules/SanitizerUtils.cmake
+++ b/cmake/Modules/SanitizerUtils.cmake
@@ -94,4 +94,5 @@ else()
add_custom_target(SanitizerLintCheck
COMMAND echo "No lint check")
endif()
-
+set_target_properties(SanitizerLintCheck
+ PROPERTIES FOLDER "Compiler-RT Misc")