Skip to content

Missing build type definitions #7

Open
@dutow

Description

@dutow

The boost thread library build depends on the existence of the BOOST_THREAD_BUILD_LIB (static) or BOOST_THREAD_BUILD_DLL (dynamic) definitions.

In the normal build, it is defined in its Jamfile.

Without one of these defined, it marks functions defined in cpp files with dllimport on Windows.

The following addition to its CMakeLists solves the problem:

if (BUILD_SHARED_LIBS)
    target_compile_definitions(boost_thread PRIVATE BOOST_THREAD_BUILD_DLL)
else()
    target_compile_definitions(boost_thread PRIVATE BOOST_THREAD_BUILD_LIB)
endif()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions