Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,818
    • Issues 3,818
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #17974
Closed
Open
Created May 07, 2018 by rtkdkopsas@rtkdkopsas

Cannot find boost libs using gcc toolset for boost 1.67 and CMake 3.11

Hi,

When using the GCC toolset in boost 1.67, the compiled libs cannot be found. This is because the file naming scheme now includes 'x32' and 'x64'. When I remove these from the compiled libs, CMake finds the boost libs.

Now, when using the MSVC toolset, CMake 3.11 finds the libs with the 'x32' and 'x64' portion in their name.

This can be tested by compiling boost with 'bootstrap gcc' and then 'b2'. In CMake perform this:

set (Boost_USE_STATIC_LIBS ON)
#set (BOOST_ROOT ${CMAKE_SOURCE_DIR}/boost_1_67_0) #if not installed in typical boost paths, tell CMake where to find
find_package (Boost 1.67.0 EXACT COMPONENTS date_time system REQUIRED)

if (Boost_FOUND)
	include_directories (${Boost_INCLUDE_DIRS})
	target_link_libraries (${PROJECT_NAME} ${Boost_LIBRARIES})
endif ()

Again, for MSVC, CMake has no issue with 'x32' and 'x64' but for GCC toolset it has problems.

https://www.boost.org/doc/libs/1_67_0/more/getting_started/windows.html (more details on building boost)

Edited May 07, 2018 by rtkdkopsas
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking