Boost logo

Boost :

Subject: Re: [boost] Cmake
From: P F (pfultz2_at_[hidden])
Date: 2017-06-25 00:14:13

> On Jun 24, 2017, at 4:19 PM, Peter Dimov via Boost <boost_at_[hidden]> wrote:
> P F wrote:
>> No, you just do `include` instead of `add_subdirectory`, but it doesn’t require installation.
> I'm not sure I understand. find_package(BCM) is unconditional in CMakeLists.txt, right?

Yes, but in the superproject I exclude it:

macro(find_package NAME)
  if(NOT "${NAME}" MATCHES "^boost_.*$" AND NOT "${NAME}" STREQUAL BCM)

Alternatively, in the superproject I could append the cmake prefix path:


Which would make `find_package(BCM)` work in the subprojects, and the include would not be needed. This might be a better approach.

> What 'include` do you do and where?

Thats the `include(bcm/share/bcm/cmake/BCMConfig.cmake)`, here:

> Unrelated, why do you need `include(GNUInstallDirs)` here:
> ?

Its not needed. I think originally I was going to use that module for the install directories.

Boost list run by bdawes at, gregod at, cpdaniel at, john at