[llvm-commits] [llvm] r89636 - /llvm/trunk/cmake/modules/AddLLVM.cmake
Oscar Fuentes
ofv at wanadoo.es
Sun Nov 22 16:32:42 PST 2009
Author: ofv
Date: Sun Nov 22 18:32:42 2009
New Revision: 89636
URL: http://llvm.org/viewvc/llvm-project?rev=89636&view=rev
Log:
CMake: Do not try to install a target before it is defined.
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=89636&r1=89635&r2=89636&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Sun Nov 22 18:32:42 2009
@@ -72,23 +72,25 @@
macro(add_llvm_tool name)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR})
- if( LLVM_BUILD_TOOLS )
- install(TARGETS ${name} RUNTIME DESTINATION bin)
- else()
+ if( NOT LLVM_BUILD_TOOLS )
set(EXCLUDE_FROM_ALL ON)
endif()
add_llvm_executable(${name} ${ARGN})
+ if( LLVM_BUILD_TOOLS )
+ install(TARGETS ${name} RUNTIME DESTINATION bin)
+ endif()
endmacro(add_llvm_tool name)
macro(add_llvm_example name)
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_EXAMPLES_BINARY_DIR})
- if( LLVM_BUILD_EXAMPLES )
- install(TARGETS ${name} RUNTIME DESTINATION examples)
- else()
+ if( NOT LLVM_BUILD_EXAMPLES )
set(EXCLUDE_FROM_ALL ON)
endif()
add_llvm_executable(${name} ${ARGN})
+ if( LLVM_BUILD_EXAMPLES )
+ install(TARGETS ${name} RUNTIME DESTINATION examples)
+ endif()
endmacro(add_llvm_example name)
More information about the llvm-commits
mailing list