Skip to content

command line flag --std is redundant... and incorrect #72

Closed
@joeroback

Description

@joeroback

I do not see the purpose of the command line flag --std... I use CMake to determine the C++ standard, c++11, gnu++11, c++14, gnu++14, etc. Yet, cmake-js seems to just append a standard... regardless of whether cmake has discovered one. Example

add_library(${PROJECT_NAME} SHARED ${SOURCES})
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON)

Will result in -std=gnu++14 on Linux, yet cmake-js will put -std=c++11 by default in CMAKE_CXX_FLAGS... and even if you pass --std gnu++14 it duplicates it on the command line.

Can there be an option to not do this and let CMake handle it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions