SPTAG icon indicating copy to clipboard operation
SPTAG copied to clipboard

cmake: drop unused `COMPONENTS` from `find_package(Boost 1.67)`

Open pabs3 opened this issue 4 years ago • 1 comments

The COMPONENTS in calls to find_package(Boost 1.67) appear to be unused (except for unit_test_framework in Test/CMakeLists.txt) since rebuilding without them still succeeds.

$ git grep -i find_package.*boost
CMakeLists.txt:find_package(Boost 1.67 COMPONENTS system thread serialization wserialization regex filesystem)
Test/CMakeLists.txt:find_package(Boost 1.67 COMPONENTS system thread serialization wserialization regex filesystem unit_test_framework)

I suggest dropping the unused components system thread serialization wserialization regex filesystem from both of the calls.

pabs3 avatar May 11 '21 06:05 pabs3

On older versions of Boost (1.67 is affected, 1.74 is not), the boost::system::system_category() function is undefined at link time unless the system component is included.

pabs3 avatar May 16 '21 03:05 pabs3