r252662 - Implement the fix that r252641 should have been
Jonathan Roelofs via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 10 14:38:59 PST 2015
Author: jroelofs
Date: Tue Nov 10 16:38:59 2015
New Revision: 252662
URL: http://llvm.org/viewvc/llvm-project?rev=252662&view=rev
Log:
Implement the fix that r252641 should have been
Modified:
cfe/trunk/tools/scan-build/CMakeLists.txt
cfe/trunk/tools/scan-view/CMakeLists.txt
Modified: cfe/trunk/tools/scan-build/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/CMakeLists.txt?rev=252662&r1=252661&r2=252662&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/CMakeLists.txt (original)
+++ cfe/trunk/tools/scan-build/CMakeLists.txt Tue Nov 10 16:38:59 2015
@@ -1,5 +1,3 @@
-add_custom_target(scan-build ALL)
-
option(CLANG_INSTALL_SCANBUILD "Install the scan-build tool" ON)
if (WIN32 AND NOT CYGWIN)
@@ -29,47 +27,55 @@ set(ResourceFiles
if(CLANG_INSTALL_SCANBUILD)
+ set(Depends )
foreach(BinFile ${BinFiles})
- add_custom_command(TARGET scan-build PRE_BUILD
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/${BinFile}
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_BINARY_DIR}/bin
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/${BinFile}
${CMAKE_BINARY_DIR}/bin/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${BinFile})
+ set(Depends ${Depends} ${CMAKE_BINARY_DIR}/bin/${BinFile})
install(PROGRAMS ${BinFile} DESTINATION bin)
endforeach()
foreach(LibexecFile ${LibexecFiles})
- add_custom_command(TARGET scan-build PRE_BUILD
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/libexec/${LibexecFile}
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_BINARY_DIR}/libexec
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/${LibexecFile}
${CMAKE_BINARY_DIR}/libexec/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${LibexecFile})
+ set(Depends ${Depends} ${CMAKE_BINARY_DIR}/libexec/${LibexecFile})
install(PROGRAMS ${LibexecFile} DESTINATION libexec)
endforeach()
foreach(ManPage ${ManPages})
- add_custom_command(TARGET scan-build PRE_BUILD
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/man/man1/${ManPage}
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_BINARY_DIR}/share/man/man1
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/${ManPage}
${CMAKE_BINARY_DIR}/share/man/man1/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${ManPage})
+ set(Depends ${Depends} ${CMAKE_BINARY_DIR}/share/man/man1/${ManPage})
install(PROGRAMS ${ManPage} DESTINATION share/man/man1)
endforeach()
foreach(ResourceFile ${ResourceFiles})
- add_custom_command(TARGET scan-build PRE_BUILD
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/${ResourceFile}
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_BINARY_DIR}/bin
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/${ResourceFile}
${CMAKE_BINARY_DIR}/bin/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${ResourceFile})
+ set(Depends ${Depends} ${CMAKE_BINARY_DIR}/bin/${ResourceFile})
install(FILES ${ResourceFile} DESTINATION bin)
endforeach()
+
+ add_custom_target(scan-build ALL DEPENDS ${Depends})
endif()
+
Modified: cfe/trunk/tools/scan-view/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-view/CMakeLists.txt?rev=252662&r1=252661&r2=252662&view=diff
==============================================================================
--- cfe/trunk/tools/scan-view/CMakeLists.txt (original)
+++ cfe/trunk/tools/scan-view/CMakeLists.txt Tue Nov 10 16:38:59 2015
@@ -1,5 +1,3 @@
-add_custom_target(scan-view ALL)
-
option(CLANG_INSTALL_SCANVIEW "Install the scan-view tool" ON)
set(BinFiles
@@ -9,30 +7,35 @@ set(BinFiles
startfile.py)
set(ResourceFiles
- Resources/FileRadar.scpt
- Resources/GetRadarVersion.scpt
- Resources/bugcatcher.ico)
+ FileRadar.scpt
+ GetRadarVersion.scpt
+ bugcatcher.ico)
if(CLANG_INSTALL_SCANVIEW)
+ set(Depends )
foreach(BinFile ${BinFiles})
- add_custom_command(TARGET scan-view PRE_BUILD
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/${BinFile}
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_BINARY_DIR}/bin
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/${BinFile}
${CMAKE_BINARY_DIR}/bin/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${BinFile})
+ set(Depends ${Depends} ${CMAKE_BINARY_DIR}/bin/${BinFile})
install(PROGRAMS ${BinFile} DESTINATION bin)
endforeach()
foreach(ResourceFile ${ResourceFiles})
- add_custom_command(TARGET scan-view PRE_BUILD
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/share/scan-view/${ResourceFile}
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_BINARY_DIR}/share/scan-view
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_CURRENT_SOURCE_DIR}/${ResourceFile}
+ ${CMAKE_CURRENT_SOURCE_DIR}/Resources/${ResourceFile}
${CMAKE_BINARY_DIR}/share/scan-view/
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${ResourceFile})
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Resources/${ResourceFile})
+ set(Depends ${Depends} ${CMAKE_BINARY_DIR}/share/scan-view/${ResourceFile})
install(FILES ${ResourceFile} DESTINATION share/scan-view)
endforeach()
+
+ add_custom_target(scan-view ALL DEPENDS ${Depends})
endif()
More information about the cfe-commits
mailing list