On Thu, Oct 26, 2017 at 12:49 AM, Wesley Smith <wesley.h...@gmail.com> wrote:
> I still don't understand the scoped syntax in Daniel Pfeifer's talk (e.g. > boost::boost) > Easy: It doesn't mean anything special, it's almost entirely just a name (think of :: as any other character). The advantage is, a) bookkeeping e.g. cleanly namespacing stuff (which admittedly could be done with _/prefixes) and more importantly b) If you give an undefined name e.g. "boost_notalib" (or something mis-spelled) to target_link_libraries it'll just add "-lboost_notalib" to the link command - because it doesn't know if it's a custom library that it doesn't know about, or an undefined target. A name like "Boost::NotALib" can never be a library name, so if it's not a defined target you'll get an error at configuration time rather than build time. (Caveat: I am not an expert so could be completely wrong in incomplete or subtle ways, but this is definitely one way it makes a difference) Nick
-- 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: http://public.kitware.com/mailman/listinfo/cmake-developers