Fix: Don't override parent's BOOST_COMPONENTS when used as submodule

Problem

When FC is used as a submodule in hive, the parent project defines BOOST_COMPONENTS with all needed components including program_options, locale, regex, and atomic.

The code added in !5 (merged) unconditionally cleared and reset BOOST_COMPONENTS:

SET( BOOST_COMPONENTS )

This caused link failures in hive builds:

undefined reference to `boost::program_options::validation_error::get_template[abi:cxx11]'

Solution

Only set FC's own BOOST_COMPONENTS when building standalone (when no parent has defined it):

if(NOT BOOST_COMPONENTS)
  # ... set components
endif()

Testing

  • FC standalone CI should still work (it defines its own components)
  • Hive builds should now succeed (parent's components are preserved)

Merge request reports

Loading