Currently you can't install libc++abi from within the LLVM tree without installing all of LLVM. This patch adds an install rule for libc++abi.
Details
Diff Detail
Event Timeline
Hi @EricWF,
I added myself and Chris as subscribers to this as it is part of the solution to an issue I brought up in the CMake Roadmap
http://permalink.gmane.org/gmane.comp.compilers.llvm.devel/88899
Many Thanks
Martell
In general I'd like a more generic solution, but I don't think we have the infrastructure for that yet, so I have no objection to the patches being done like this.
See my comment inline below for the one thing that needs to change.
Thanks,
-Chris
src/CMakeLists.txt | ||
---|---|---|
123 | You should not specify both ARCHIVE and LIBRARY in the same install command. One of the two will be ignored. As per the documentation (http://www.cmake.org/cmake/help/v3.0/command/install.html). You will need to do something similar to what is done in AddLLVM.cmake:507-520. |
The signature is:
install(TARGETS targets... [EXPORT <export-name>] [[ARCHIVE|LIBRARY|RUNTIME|FRAMEWORK|BUNDLE| PRIVATE_HEADER|PUBLIC_HEADER|RESOURCE] [DESTINATION <dir>] [INCLUDES DESTINATION [<dir> ...]] [PERMISSIONS permissions...] [CONFIGURATIONS [Debug|Release|...]] [COMPONENT <component>] [OPTIONAL] [NAMELINK_ONLY|NAMELINK_SKIP] ] [...])
The | markers between the argument values mean OR.
You may also note that DESTINATION only shows up once because only one occurrence of it is parsed, and it only accepts one value.
I know that the code you wrote follows a pattern that exists elsewhere in our CMake, I'm just saying it doesn't work, so we shouldn't introduce more occurrences.
What about the extra [ at the beginning of ARCHIVE that spans all the way down to the last line. It seems to me that DESTINATION can be supplied for each library type. There is also an example in the docs that shows using two library types in one install command.
However if your still not confident it will work correctly I will make the change.
@beanz I tested installing both libc++abi.so and libc++abi.a at the same time with different destinations. They both installed into the correct destinations.
You are right, and I apparently don't know how to read documentation...
Patch LGTM as is.
You should not specify both ARCHIVE and LIBRARY in the same install command. One of the two will be ignored. As per the documentation (http://www.cmake.org/cmake/help/v3.0/command/install.html).
You will need to do something similar to what is done in AddLLVM.cmake:507-520.