llvm.org GIT mirror llvm / 0b85d07
Put targets on folders, if the IDE supports the feature. Requires CMake 2.8.3 or newer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126092 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 8 years ago
11 changed file(s) with 26 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
1010 )
1111
1212 set(PACKAGE_VERSION "2.9")
13
14 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
1315
1416 include(VersionFromVCS)
1517
2424 if( CURRENT_LLVM_TARGET )
2525 add_dependencies(${name} ${CURRENT_LLVM_TARGET})
2626 endif()
27 set_target_properties(${name} PROPERTIES FOLDER "Libraries")
2728 endmacro(add_llvm_library name)
2829
2930
5455 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
5556 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
5657 endif()
58
59 set_target_properties(${name} PROPERTIES FOLDER "Loadable modules")
5760 endmacro(add_llvm_loadable_module name)
5861
5962
9497 if( LLVM_BUILD_TOOLS )
9598 install(TARGETS ${name} RUNTIME DESTINATION bin)
9699 endif()
100 set_target_properties(${name} PROPERTIES FOLDER "Tools")
97101 endmacro(add_llvm_tool name)
98102
99103
106110 if( LLVM_BUILD_EXAMPLES )
107111 install(TARGETS ${name} RUNTIME DESTINATION examples)
108112 endif()
113 set_target_properties(${name} PROPERTIES FOLDER "Examples")
109114 endmacro(add_llvm_example name)
115
116
117 macro(add_llvm_utility name)
118 add_llvm_executable(${name} ${ARGN})
119 set_target_properties(${name} PROPERTIES FOLDER "Utils")
120 endmacro(add_llvm_utility name)
110121
111122
112123 macro(add_llvm_target target_name)
119130 add_llvm_library(LLVM${target_name} ${ARGN} ${TABLEGEN_OUTPUT})
120131 if ( TABLEGEN_OUTPUT )
121132 add_dependencies(LLVM${target_name} ${target_name}Table_gen)
133 set_target_properties(${target_name}Table_gen PROPERTIES FOLDER "Tablegenning")
122134 endif (TABLEGEN_OUTPUT)
123135 set( CURRENT_LLVM_TARGET LLVM${target_name} )
124136 endmacro(add_llvm_target)
33
44 add_custom_target(intrinsics_gen ALL
55 DEPENDS ${llvm_builded_incs_dir}/Intrinsics.gen)
6 set_target_properties(intrinsics_gen PROPERTIES FOLDER "Tablegenning")
67
78 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} intrinsics_gen PARENT_SCOPE)
89
1516 # We need at least one source file:
1617 ${LLVM_MAIN_SRC_DIR}/lib/Transforms/Hello/Hello.cpp
1718 ${headers})
19 set_target_properties(llvm_headers_do_not_build PROPERTIES FOLDER "Misc")
1820 endif()
8181 ${LIT_ARGS}
8282 ${CMAKE_CURRENT_BINARY_DIR}
8383 COMMENT "Running LLVM regression tests")
84 set_target_properties(check PROPERTIES FOLDER "Tests")
8485
8586 add_custom_target(check.deps)
8687 add_dependencies(check check.deps)
9091 llc lli llvm-ar llvm-as llvm-dis llvm-extract
9192 llvm-ld llvm-link llvm-mc llvm-nm macho-dump opt
9293 FileCheck count not)
94 set_target_properties(check.deps PROPERTIES FOLDER "Tests")
9395
9496 endif()
1111 endif()
1212 add_llvm_executable(${test_name}Tests ${ARGN})
1313 add_dependencies(UnitTests ${test_name}Tests)
14 set_target_properties(${test_name}Tests PROPERTIES FOLDER "Tests")
1415 endfunction()
1516
1617 add_custom_target(UnitTests)
18 set_target_properties(UnitTests PROPERTIES FOLDER "Tests")
1719
1820 include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
1921 add_definitions(-DGTEST_HAS_RTTI=0)
None add_executable(FileCheck
0 add_llvm_utility(FileCheck
11 FileCheck.cpp
22 )
33
None add_executable(FileUpdate
0 add_llvm_utility(FileUpdate
11 FileUpdate.cpp
22 )
33
None add_executable(KillTheDoctor
0 add_llvm_utility(KillTheDoctor
11 KillTheDoctor.cpp
22 )
33
22
33 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR})
44
5 add_executable(tblgen
5 add_llvm_utility(tblgen
66 ARMDecoderEmitter.cpp
77 AsmMatcherEmitter.cpp
88 AsmWriterEmitter.cpp
None add_executable(count
0 add_llvm_utility(count
11 count.c
22 )
None add_executable(not
0 add_llvm_utility(not
11 not.cpp
22 )
33