[llvm-commits] [llvm] r126092 - in /llvm/trunk: CMakeLists.txt cmake/modules/AddLLVM.cmake include/llvm/CMakeLists.txt test/CMakeLists.txt unittests/CMakeLists.txt utils/FileCheck/CMakeLists.txt utils/FileUpdate/CMakeLists.txt utils/KillTheDoctor/CMakeLists.txt utils/TableGen/CMakeLists.txt utils/count/CMakeLists.txt utils/not/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Sun Feb 20 14:06:10 PST 2011
Author: ofv
Date: Sun Feb 20 16:06:10 2011
New Revision: 126092
URL: http://llvm.org/viewvc/llvm-project?rev=126092&view=rev
Log:
Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/cmake/modules/AddLLVM.cmake
llvm/trunk/include/llvm/CMakeLists.txt
llvm/trunk/test/CMakeLists.txt
llvm/trunk/unittests/CMakeLists.txt
llvm/trunk/utils/FileCheck/CMakeLists.txt
llvm/trunk/utils/FileUpdate/CMakeLists.txt
llvm/trunk/utils/KillTheDoctor/CMakeLists.txt
llvm/trunk/utils/TableGen/CMakeLists.txt
llvm/trunk/utils/count/CMakeLists.txt
llvm/trunk/utils/not/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Sun Feb 20 16:06:10 2011
@@ -12,6 +12,8 @@
set(PACKAGE_VERSION "2.9")
+set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+
include(VersionFromVCS)
option(LLVM_APPEND_VC_REV
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Sun Feb 20 16:06:10 2011
@@ -25,6 +25,7 @@
if( CURRENT_LLVM_TARGET )
add_dependencies(${name} ${CURRENT_LLVM_TARGET})
endif()
+ set_target_properties(${name} PROPERTIES FOLDER "Libraries")
endmacro(add_llvm_library name)
@@ -55,6 +56,8 @@
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
endif()
+
+ set_target_properties(${name} PROPERTIES FOLDER "Loadable modules")
endmacro(add_llvm_loadable_module name)
@@ -95,6 +98,7 @@
if( LLVM_BUILD_TOOLS )
install(TARGETS ${name} RUNTIME DESTINATION bin)
endif()
+ set_target_properties(${name} PROPERTIES FOLDER "Tools")
endmacro(add_llvm_tool name)
@@ -107,9 +111,16 @@
if( LLVM_BUILD_EXAMPLES )
install(TARGETS ${name} RUNTIME DESTINATION examples)
endif()
+ set_target_properties(${name} PROPERTIES FOLDER "Examples")
endmacro(add_llvm_example name)
+macro(add_llvm_utility name)
+ add_llvm_executable(${name} ${ARGN})
+ set_target_properties(${name} PROPERTIES FOLDER "Utils")
+endmacro(add_llvm_utility name)
+
+
macro(add_llvm_target target_name)
if( TABLEGEN_OUTPUT )
add_custom_target(${target_name}Table_gen
@@ -120,6 +131,7 @@
add_llvm_library(LLVM${target_name} ${ARGN} ${TABLEGEN_OUTPUT})
if ( TABLEGEN_OUTPUT )
add_dependencies(LLVM${target_name} ${target_name}Table_gen)
+ set_target_properties(${target_name}Table_gen PROPERTIES FOLDER "Tablegenning")
endif (TABLEGEN_OUTPUT)
set( CURRENT_LLVM_TARGET LLVM${target_name} )
endmacro(add_llvm_target)
Modified: llvm/trunk/include/llvm/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CMakeLists.txt?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CMakeLists.txt (original)
+++ llvm/trunk/include/llvm/CMakeLists.txt Sun Feb 20 16:06:10 2011
@@ -4,6 +4,7 @@
add_custom_target(intrinsics_gen ALL
DEPENDS ${llvm_builded_incs_dir}/Intrinsics.gen)
+set_target_properties(intrinsics_gen PROPERTIES FOLDER "Tablegenning")
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} intrinsics_gen PARENT_SCOPE)
@@ -16,4 +17,5 @@
# We need at least one source file:
${LLVM_MAIN_SRC_DIR}/lib/Transforms/Hello/Hello.cpp
${headers})
+ set_target_properties(llvm_headers_do_not_build PROPERTIES FOLDER "Misc")
endif()
Modified: llvm/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CMakeLists.txt?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/test/CMakeLists.txt (original)
+++ llvm/trunk/test/CMakeLists.txt Sun Feb 20 16:06:10 2011
@@ -82,6 +82,7 @@
${LIT_ARGS}
${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Running LLVM regression tests")
+ set_target_properties(check PROPERTIES FOLDER "Tests")
add_custom_target(check.deps)
add_dependencies(check check.deps)
@@ -91,5 +92,6 @@
llc lli llvm-ar llvm-as llvm-dis llvm-extract
llvm-ld llvm-link llvm-mc llvm-nm macho-dump opt
FileCheck count not)
+ set_target_properties(check.deps PROPERTIES FOLDER "Tests")
endif()
Modified: llvm/trunk/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/CMakeLists.txt?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/unittests/CMakeLists.txt (original)
+++ llvm/trunk/unittests/CMakeLists.txt Sun Feb 20 16:06:10 2011
@@ -12,9 +12,11 @@
endif()
add_llvm_executable(${test_name}Tests ${ARGN})
add_dependencies(UnitTests ${test_name}Tests)
+ set_target_properties(${test_name}Tests PROPERTIES FOLDER "Tests")
endfunction()
add_custom_target(UnitTests)
+set_target_properties(UnitTests PROPERTIES FOLDER "Tests")
include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
add_definitions(-DGTEST_HAS_RTTI=0)
Modified: llvm/trunk/utils/FileCheck/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/CMakeLists.txt?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/utils/FileCheck/CMakeLists.txt (original)
+++ llvm/trunk/utils/FileCheck/CMakeLists.txt Sun Feb 20 16:06:10 2011
@@ -1,4 +1,4 @@
-add_executable(FileCheck
+add_llvm_utility(FileCheck
FileCheck.cpp
)
Modified: llvm/trunk/utils/FileUpdate/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileUpdate/CMakeLists.txt?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/utils/FileUpdate/CMakeLists.txt (original)
+++ llvm/trunk/utils/FileUpdate/CMakeLists.txt Sun Feb 20 16:06:10 2011
@@ -1,4 +1,4 @@
-add_executable(FileUpdate
+add_llvm_utility(FileUpdate
FileUpdate.cpp
)
Modified: llvm/trunk/utils/KillTheDoctor/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/KillTheDoctor/CMakeLists.txt?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/utils/KillTheDoctor/CMakeLists.txt (original)
+++ llvm/trunk/utils/KillTheDoctor/CMakeLists.txt Sun Feb 20 16:06:10 2011
@@ -1,4 +1,4 @@
-add_executable(KillTheDoctor
+add_llvm_utility(KillTheDoctor
KillTheDoctor.cpp
)
Modified: llvm/trunk/utils/TableGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CMakeLists.txt?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CMakeLists.txt (original)
+++ llvm/trunk/utils/TableGen/CMakeLists.txt Sun Feb 20 16:06:10 2011
@@ -3,7 +3,7 @@
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR})
-add_executable(tblgen
+add_llvm_utility(tblgen
ARMDecoderEmitter.cpp
AsmMatcherEmitter.cpp
AsmWriterEmitter.cpp
Modified: llvm/trunk/utils/count/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/count/CMakeLists.txt?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/utils/count/CMakeLists.txt (original)
+++ llvm/trunk/utils/count/CMakeLists.txt Sun Feb 20 16:06:10 2011
@@ -1,3 +1,3 @@
-add_executable(count
+add_llvm_utility(count
count.c
)
Modified: llvm/trunk/utils/not/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/not/CMakeLists.txt?rev=126092&r1=126091&r2=126092&view=diff
==============================================================================
--- llvm/trunk/utils/not/CMakeLists.txt (original)
+++ llvm/trunk/utils/not/CMakeLists.txt Sun Feb 20 16:06:10 2011
@@ -1,4 +1,4 @@
-add_executable(not
+add_llvm_utility(not
not.cpp
)
More information about the llvm-commits
mailing list