[llvm] r223309 - Make llvm-ar a real build target and install it.
Kuperstein, Michael M
michael.m.kuperstein at intel.com
Sun Dec 7 08:14:25 PST 2014
Hello Rafael,
It looks like one of the patches in this series broke CMake for Visual Studio.
Two things look wrong:
1) The llvm-ranlib project is in the solution root, instead of living under tools.
2) The INSTALL target fails:
46> CMake Error at tools/llvm-ar/cmake_install.cmake:43 (FILE):
46> file INSTALL cannot find
46> "C:/llvm/clang/build/$(Configuration)/bin/llvm-ranlib.exe".
46> Call Stack (most recent call first):
46> tools/cmake_install.cmake:38 (INCLUDE)
46> cmake_install.cmake:56 (INCLUDE)
I don't know enough (=anything) about CMake to fix this, unfortunately.
Could you please take a look?
Thanks,
Michael
-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Rafael Espindola
Sent: Thursday, December 04, 2014 01:17
To: llvm-commits at cs.uiuc.edu
Subject: [llvm] r223309 - Make llvm-ar a real build target and install it.
Author: rafael
Date: Wed Dec 3 17:17:24 2014
New Revision: 223309
URL: http://llvm.org/viewvc/llvm-project?rev=223309&view=rev
Log:
Make llvm-ar a real build target and install it.
Modified:
llvm/trunk/tools/llvm-ar/CMakeLists.txt
Modified: llvm/trunk/tools/llvm-ar/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/CMakeLists.txt?rev=223309&r1=223308&r2=223309&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-ar/CMakeLists.txt Wed Dec 3 17:17:24 2014
@@ -9,22 +9,17 @@ add_llvm_tool(llvm-ar
llvm-ar.cpp
)
-# FIXME: this is duplicated from the clang CMakeLists.txt -# FIXME: bin/llvm-ranlib is not a valid build target with this setup (pr17024)
-
if(UNIX)
set(LLVM_LINK_OR_COPY create_symlink)
- set(llvm_ar_binary "llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
else()
set(LLVM_LINK_OR_COPY copy)
- set(llvm_ar_binary "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
endif()
+set(llvm_ar_binary "llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
set(llvm_ranlib "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX}")
-add_custom_command(TARGET llvm-ar POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${llvm_ar_binary}" "${llvm_ranlib}")
-set_property(DIRECTORY APPEND
- PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${llvm_ranlib})
+add_custom_command(OUTPUT ${llvm_ranlib}
+ COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY}
+"${llvm_ar_binary}" "${llvm_ranlib}")
-# TODO: Support check-local.
+add_custom_target(llvm_ranlib_build ALL DEPENDS ${llvm_ranlib})
+install(FILES "${llvm_ranlib}" DESTINATION bin)
_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the llvm-commits
mailing list