I am currently trying to update three CMake-based build systems (for PLplot, ephcom, and te_gen) to use best practices following the really useful example of best practice given at <https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/>.
That example uses the NAMESPACE signature for the install(EXPORT ... ) command to export its targets. I realize that is a quite common practice, but I don't understand the motivation for this practice. After all, the library names (and therefore the un-namespaced associated targets) already are virtually guaranteed to be unique (since two projects with two different libraries with a common library name would be an invitation to nameclash disaster). So what are the actual benefits of namespacing the exported targets associated with libraries? The reason why I ask is namespaced targets would add some (small) complexity to my build systems. For example, I would need to define a namespaced ALIAS target for each library in my build tree to use common CMake logic to refer to that library in the build systems for both my build tree and install tree. (I use that common-code practice for all three of the above projects.) Defining such ALIAS targets should be absolutely straightforward, but I want to make sure the actual namespaced target benefits outweigh this small added complexity. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake