{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/3447","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/3447/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/3447/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/3447/events","html_url":"https://github.com/kripken/emscripten/pull/3447","id":75089734,"number":3447,"title":"Better support for CMake: TestBigEndian, CheckTypeSize, CMAKE_CROSSCOMPILING_EMULATOR","user":{"login":"thewtex","id":25432,"avatar_url":"https://avatars.githubusercontent.com/u/25432?v=3","gravatar_id":"","url":"https://api.github.com/users/thewtex","html_url":"https://github.com/thewtex","followers_url":"https://api.github.com/users/thewtex/followers","following_url":"https://api.github.com/users/thewtex/following{/other_user}","gists_url":"https://api.github.com/users/thewtex/gists{/gist_id}","starred_url":"https://api.github.com/users/thewtex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thewtex/subscriptions","organizations_url":"https://api.github.com/users/thewtex/orgs","repos_url":"https://api.github.com/users/thewtex/repos","events_url":"https://api.github.com/users/thewtex/events{/privacy}","received_events_url":"https://api.github.com/users/thewtex/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kripken/emscripten/labels/CMake","name":"CMake","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"juj","id":225351,"avatar_url":"https://avatars.githubusercontent.com/u/225351?v=3","gravatar_id":"","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-05-11T05:14:13Z","updated_at":"2015-05-12T14:24:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kripken/emscripten/pulls/3447","html_url":"https://github.com/kripken/emscripten/pull/3447","diff_url":"https://github.com/kripken/emscripten/pull/3447.diff","patch_url":"https://github.com/kripken/emscripten/pull/3447.patch"},"body":"This overrides two CMake modules that are commonly used by projects, especially scientific projects or projects that aim to support a number of platforms.\r\n\r\nThe TestBigEndian modules is replaced.  This addresses:\r\n\r\n  https://github.com/kripken/emscripten/issues/1106\r\n\r\nAlso the CheckTypeSize module is replaced.\r\n\r\n  https://github.com/kripken/emscripten/issues/400\r\n\r\nThe fix for CheckTypeSize involves the use of the CMake try_run command.  Also ease the building of CMake project files by adding support for the CMAKE_CROSSCOMPILING_EMULATOR variable, and pointing it to nodejs.  This prevents the need to manually populate CMake TryRunResults.cmake files. It currently requires CMake Git master (to be released as  CMake 3.3).  Everything should still work with older CMake.\r\n\r\nNew tests are added to the test suite.  All tests passed when\r\n\r\n  tests/runner.py\r\n"},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/101299862","html_url":"https://github.com/kripken/emscripten/pull/3447#issuecomment-101299862","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/3447","id":101299862,"user":{"login":"juj","id":225351,"avatar_url":"https://avatars.githubusercontent.com/u/225351?v=3","gravatar_id":"","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T14:24:23Z","updated_at":"2015-05-12T14:24:23Z","body":"@weitjong: The current approach is to call `emcmake cmake`, which takes care of passing the correct command line parameters (including `-DCMAKE_MODULE_PATH`) correctly, so a project maintainer does not need to configure the module paths manually. This does have the limitation that a project cannot override `CMAKE_MODULE_PATH` with its own custom setting (or if it does, it has to be smart about when to do it, I think). If there is a good way around that, it would be good to know.\r\n\r\nI don't think it's feasible to take the approach that Emscripten should not do \"system\" customizations to CMake, but that development should be done in upstream CMake, since especially in Linux world, people typically have very old CMakes in their systems, 2.8 seems to be quite popular, so it would be a very slow way to move forward. Having `emcmake` wrap cmake and set up `CMAKE_MODULE_PATH` has been the least painful path for quick iteration so far."}}