{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/3191","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/3191/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/3191/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/3191/events","html_url":"https://github.com/kripken/emscripten/issues/3191","id":57667280,"number":3191,"title":"Preferred CMake flag to detect if on Emscripten","user":{"login":"httpdigest","id":7488613,"avatar_url":"https://avatars.githubusercontent.com/u/7488613?v=3","gravatar_id":"","url":"https://api.github.com/users/httpdigest","html_url":"https://github.com/httpdigest","followers_url":"https://api.github.com/users/httpdigest/followers","following_url":"https://api.github.com/users/httpdigest/following{/other_user}","gists_url":"https://api.github.com/users/httpdigest/gists{/gist_id}","starred_url":"https://api.github.com/users/httpdigest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/httpdigest/subscriptions","organizations_url":"https://api.github.com/users/httpdigest/orgs","repos_url":"https://api.github.com/users/httpdigest/repos","events_url":"https://api.github.com/users/httpdigest/events{/privacy}","received_events_url":"https://api.github.com/users/httpdigest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-13T23:18:49Z","updated_at":"2015-02-14T07:33:59Z","closed_at":null,"body":"Hi,\r\n\r\nI try to build a cross-platform CMakeLists.txt that allows me to configure and build both under Windows with msvc and on Emscripten. Now, the compilation and linking steps all succeed for both compilers/platforms, but I want to get rid of some warnings emited by emcc, using \"-Wno-warn-absolute-paths\" to not let it complain about absolute paths that CMake always uses when referencing library and include paths and also to activate C++11 support via \"-std=c++11\" to not let it complain about some range-based for loops I am using.\r\nI wanted to include an add_definitions instruction in my CMake build file wrapped in an if()endif() but so far, I have yet to find the correct condition that tells me that I am under emcc.\r\nI also do not want to identify a GNU or Clang compiler there, because I still want to be able to compile with the real Clang and x86 LLVM backends, and not with Emscripten/fastcomp.\r\n\r\nWhat is the preferred condition here to detect if on emcc/em++?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/74365655","html_url":"https://github.com/kripken/emscripten/issues/3191#issuecomment-74365655","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/3191","id":74365655,"user":{"login":"usagi","id":115972,"avatar_url":"https://avatars.githubusercontent.com/u/115972?v=3","gravatar_id":"","url":"https://api.github.com/users/usagi","html_url":"https://github.com/usagi","followers_url":"https://api.github.com/users/usagi/followers","following_url":"https://api.github.com/users/usagi/following{/other_user}","gists_url":"https://api.github.com/users/usagi/gists{/gist_id}","starred_url":"https://api.github.com/users/usagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usagi/subscriptions","organizations_url":"https://api.github.com/users/usagi/orgs","repos_url":"https://api.github.com/users/usagi/repos","events_url":"https://api.github.com/users/usagi/events{/privacy}","received_events_url":"https://api.github.com/users/usagi/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T07:33:59Z","updated_at":"2015-02-14T07:33:59Z","body":"And, you can change cmake variables if you need:\r\n\r\n- CMAKE_LIBRARY_PATH\r\n- CMAKE_INCLUDE_PATH\r\n- CMAKE_SYSTEM_LIBRARY_PATH\r\n- CMAKE_PREFIX_PATH\r\n\r\neg.: `set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /aaa /bbb/ccc)`\r\nref.: http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_LIBRARY_PATH.html"}}