1

The cmake documentation states that there is:

Boost_INCLUDE_DIRS     - Boost include directories

and later in the same documentation

Boost_INCLUDE_DIR         - Directory containing Boost headers

One with s, one without.

What is the difference between those two? Which one do I point to my boost installation?

1 Answer 1

1

The first variant,

Boost_INCLUDE_DIRS     - Boost include directories

is among variables titled with

results are reported in variables:

These variable are for using (via read) in the CMakeLists.txt after find_package(Boost).

The second variant,

Boost_INCLUDE_DIR         - Directory containing Boost headers

is among variables titled with

saves search results persistently in CMake cache entries:

That is, you may set this CACHE variable (e.g. with -D option when call cmake) for hint CMake about the Boost location.

But preferable way for hint CMake about Boost location is to set variables in the list above, titled with

This module reads hints about search locations from variables:

When read these variables, CMake (FindBoost.cmake script) checks their value for correctness. E.g. it could be checked that directory stored in variable BOOST_INCLUDEDIR actually contains some Boost headers.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.