Rather than building up a list to iterate over later, just create multiple install commands based on the configuration. This makes it easier to see what is getting installed and allows for the install handling to be centralised. NFC
Diff Detail
- Repository
- rCXX libc++
Event Timeline
I like that. Almost anything that helps us abolish global variables and lists (here LIBCXX_INSTALL_TARGETS) in the CMake scripts is a good thing.
src/CMakeLists.txt | ||
---|---|---|
441 | Just to double-check, it's redundant to say ARCHIVE here because CMake knows it's a static archive -- correct? |
@ldionne - that was exactly the motivation for this change - it always takes me a couple of reads to figure out what we are trying to do here.
src/CMakeLists.txt | ||
---|---|---|
441 | No, the ARCHIVE DESTINATION here indicates to CMake where to install the target *if* it is an archive. This is the location used if the target is a static library or if the target is Windows and the target is a shared library in which case this is the path where the import library is installed. |
Nice!
src/CMakeLists.txt | ||
---|---|---|
440 | Super nit: you don't have a newline here but do have a newline before the LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY conditional. (I don't have a preference for newline vs. no newline; the inconsistency is just mildly noticeable). |
Super nit: you don't have a newline here but do have a newline before the LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY conditional. (I don't have a preference for newline vs. no newline; the inconsistency is just mildly noticeable).