Skip to content

Force C++11 (at least on Ubuntu 18.04) #207

@darksylinc

Description

@darksylinc

Trying to link after compiling with Clang 7.0 will fail because it defaults to C++14; yet ImageIO as provided by Ubuntu 18.04 was built using C++11

Simply adding: set(CMAKE_CXX_STANDARD 11)
at the top of the root CMakeLists.txt fixed the problem.

Btw building with gcc is broken. It keeps complaining:

/usr/include/OpenEXR/ImathMatrix.h:2822:43: error: ISO C++1z does not allow dynamic exception specifications
 Matrix44<T>::inverse (bool singExc) const throw (IEX_NAMESPACE::MathExc)

I have no idea how to force CMake to NOT use C++1z; and I gave up since Clang works.

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