Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Standard C++ 11 flag #2

@wacrenier

Description

@wacrenier

Depending on your system, it may happen that cmake will not use the standard C++11 version causing many errors when compiling pn.cc (such as: 'char16_t' does not name a type).
Adding the "-std=gnu++11" flag to 'build/CMakeCache.txt' corrects the compiling errors but linking failed to find reference to libphonenumber library.
If adding the "-std=gnu++11 -ldl" flag to 'build/CMakeCache.txt' corrects all issues it implies non easy to find manual operation.

It would be great if we could add appropriate option directly in file 'CMakeList.txt' file.
Suggestion adding the 2 following lines in file 'CMakeList.txt':

SET(GCC_COVERAGE_COMPILE_FLAGS "-std=gnu++11 -ldl")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions