OGRECave / ogre-procedural

procedural geometry for Ogre3D
https://ogrecave.github.io/ogre-procedural/
MIT License
40 stars 15 forks source link

build fails for emscripten target against ogre 1.11 #148

Closed uvguy closed 6 years ago

uvguy commented 6 years ago

Emscripten : 1.37.36 Ogre version : master

Having small build problem against ogre-procedural master branch, here is the full error log:

build_error_emscripten.txt

Which sound like emscripten clang problem deducing bool operator against unique_ptr in ogrepass.h. Related : https://github.com/OGRECave/ogre/issues/716

paroj commented 6 years ago

have you tried setting CMAKE_CXX_FLAGS=-std=c++11 already? Ogre 1.11 requires C++11, but the addons have not been updated accordingly yet.

uvguy commented 6 years ago

have you tried setting CMAKE_CXX_FLAGS=-std=c++11 already?

I don't understand why need that. Because std::unique_ptr is valid c++11 code.

paroj commented 6 years ago

to explicitly tell clang which C++ version to use. (note ogre 1.11 already does this, ogre-procedural does not) see http://en.cppreference.com/w/cpp/types/NULL

paroj commented 6 years ago

just verified that -std=c++11 fixes the issue