Boost's CMAKE page (http://bcm.readthedocs.io/en/latest/src/Building.html)
says:

So this will build the library named boost_filesystem, however, we need to
supply the dependencies to boost_filesystem and add the include
directories. To add the include directory we use
target_include_directories. For this, we tell cmake to use local include
directory, but since this is only valid during build and not after
installation, we use the BUILD_INTERFACE generator expression so that cmake
will only use it during build and not installation:

target_include_directories(boost_filesystem PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)


Is is necessary to use a BUILD_INTERFACE here?  Couldn't you use
PUBLIC/PRIVATE/INTERFACE to achieve the same effect?  What are the use
cases over for BUILD_INTERFACE that setting include dirs as
PUBLIC/PRIVATE/INTERFACE doesn't cover?

thanks,
wes
-- 

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

Reply via email to