Skip to content

CMakeList.txt assumes gcc is /usr/bin/g++ and clang is /usr/bin/clang++ #21

@mpmilano

Description

@mpmilano

It looks like the project's root CMakeLists.txt makes assumptions about where clang and GCC are installed which doesn't match all configurations / distributions. In particular, I'm referring to the conditionals which guard appending "-pthread" (and other flags) to the CMAKE_CXX_FLAGS_COMMON variable. The fix is likely as simple as changing the conditional guard by replacing instances of ${CMAKE_CXX_COMPILER} STREQUAL "/usr/bin/clang++" with ${CMAKE_CXX_COMPILER_ID} MATCHES "(C|c?)lang" (and similar for GCC).

The valid values of CMAKE_CXX_COMPILER_ID can be found here

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