<< April 21, 2020 | Home | April 23, 2020 >>

cmake,emscripten and c++17

Trying to compile my c++17 based project (using entt) makes problems with using my urho3d-docker-web-image that uses emscripten for compilation to web.

emcc (Emscripten gcc/clang-like replacement) 1.39.8 ((unknown revision))

Using (I'm mainly using gcc for compilation, android uses clang afaik?)

target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)

leads to an error like that:

CMake Error at CMakeLists.txt:95 (target_compile_features):
  target_compile_features no known features for CXX compiler


  version 1.39.8.

I tried a couple of approaches, but the only one that worked for me was a 'brutal' add_definitions(..)

add_definitions(-std=c++1z -std=gnu++1z)

I didn't dig too deep into the problem...but for now it works... ;)

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!
<< April 21, 2020 | Home | April 23, 2020 >>