I decided to upgrade the boost from 1.67 to 1.70. After the update, all cmake scripts linking boost stopped parsing normally and give an error:
/usr/local/lib/cmake/Boost-1.70.0/BoostConfig.cmake:95: error: Found package configuration file: /usr/local/lib/cmake/boost_system-1.70.0/boost_system-config.cmake but it set boost_system_FOUND to FALSE so package "boost_system" is considered to be NOT FOUND. Reason given by package: No suitable build variant has been found. /usr/local/lib/cmake/Boost-1.70.0/BoostConfig.cmake:124 (boost_find_dependency) /usr/local/share/cmake-3.14/Modules/FindBoost.cmake:266 (find_package) CMakeLists.txt:73 (find_package) On the forums, cmake found an appropriate topic, which said that to build projects with the newest boost, you need the newest cmake and for the 70th version you need cmake version 3.14. Zapulil, assembled, installed, desktop projects began to gather normally. The problem is that some of my projects use cross-compilation and build under the Linux-arm. I collected the 70th boost under the arm, tried to build the project and got the same error (i.e., updating to cmake 3.14 did not help in the case of cross-compilation).
Part of the CMake script responsible for linking arm boost:
set (Boost_USE_STATIC_LIBS ON) # ΠΠΏΡΠ΅Π΄Π΅Π»ΡΠ΅ΠΌ Π² ΠΊΠ°ΠΊΠΎΠΌ ΡΠ΅ΠΆΠΈΠΌΠ΅ Π±ΡΠ΄Π΅Ρ ΡΠ°Π±ΠΎΡΠ°ΡΡ boost Π² ΡΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΎΠΌ ΠΈΠ»ΠΈ Π΄ΠΈΠ½Π°ΠΌΠΈΡΠ΅ΡΠΊΠΎΠΌ set (Boost_USE_MULTITHREADED OFF) # ΠΡΠ΄Π΅Ρ Π»ΠΈ boost ΡΠ°Π±ΠΎΡΠ°ΡΡ Π² ΠΌΠ½ΠΎΠ³ΠΎΠΏΠΎΡΠΎΡΠ½ΠΎΠΌ ΡΠ΅ΠΆΠΈΠΌΠ΅. set (Boost_NO_SYSTEM_PATHS ON) # ΠΠΎΠ²ΠΎΡΠΈΠΌ ΡΡΠΎ Π±ΡΡΡ Π½ΡΠΆΠ΅Π½ Π½Π΅ ΠΈΠ· ΡΠΈΡΡΠ΅ΠΌΠ½ΠΎΠΉ ΠΏΠ°ΠΏΠΊΠΈ set (BOOST_ROOT "/home/rivandblack/LinaroToolchain/target_lib/boost_1_70_0/") # ΠΠΎΠ²ΠΎΡΠΈΠΌ ΠΎΡΠΊΡΠ΄Π° Π½Π΅ΠΎΠ±Ρ
ΠΎΠ΄ΠΈΠΌΠΎ Π±ΡΠ°ΡΡ boost find_package(Boost REQUIRED system) # ΠΠ°Ρ
ΠΎΠ΄ΠΈΠΌ boost ΠΏΠΎ ΡΡΡΠ»ΠΊΠ΅ BOOST_ROOT (system ΡΡΡ ΠΎΠ±ΡΠ·Π°ΡΠ΅Π»ΡΠ½Π°) include_directories (SYSTEM ${Boost_INCLUDE_DIR}) # ΠΠΎΠ±Π°Π²Π»ΡΠ΅ΠΌ ΠΏΡΡΠΈ link_directories(${Boost_LIBRARIES}) # ΠΠΎΠ±Π°Π²Π»ΡΠ΅ΠΌ ΠΏΡΡΠΈ In the cmake script, note that I am replacing the system boost path so that I can "slip" the correct version of the library. I donβt know how correct this is, but before this version it always worked correctly.
By car on which the project is assembled, Kubuntu 18.04 is used; cmake 3.14.3; GCC 7.3; boost 1.70; IDE Qt Creator 4.9.0.