Skip to content

set_common_compile_options(..) 'forces' C++ language on #57

@gavanderhoorn

Description

@gavanderhoorn

Trying to build Micro-CDR on a platform without (proper) C++ support, I noticed that even though the top-level CMakeLists.txt only enabled C:

project(microcdr VERSION "1.2.0" LANGUAGES C)

it then continues and includes cmake/common/check_configuration.cmake, which does:

function(set_common_compile_options target)
enable_language(C)
enable_language(CXX)

which ends up testing my platform's C++ compiler and fails.

Commenting the enable_language(CXX) makes everything work (the C-side is fine).

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