{"action":"created","issue":{"url":"https://api.github.com/repos/beltoforion/muparserx/issues/64","labels_url":"https://api.github.com/repos/beltoforion/muparserx/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/beltoforion/muparserx/issues/64/comments","events_url":"https://api.github.com/repos/beltoforion/muparserx/issues/64/events","html_url":"https://github.com/beltoforion/muparserx/issues/64","id":112915295,"number":64,"title":"CMake version mismatch","user":{"login":"golpa","id":13646067,"avatar_url":"https://avatars.githubusercontent.com/u/13646067?v=3","gravatar_id":"","url":"https://api.github.com/users/golpa","html_url":"https://github.com/golpa","followers_url":"https://api.github.com/users/golpa/followers","following_url":"https://api.github.com/users/golpa/following{/other_user}","gists_url":"https://api.github.com/users/golpa/gists{/gist_id}","starred_url":"https://api.github.com/users/golpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golpa/subscriptions","organizations_url":"https://api.github.com/users/golpa/orgs","repos_url":"https://api.github.com/users/golpa/repos","events_url":"https://api.github.com/users/golpa/events{/privacy}","received_events_url":"https://api.github.com/users/golpa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-22T23:55:47Z","updated_at":"2015-10-23T00:36:19Z","closed_at":null,"body":"The CMakeLists.txt files specifies that it requires cmake version 2.8.0. However, the cmake command `add_compile_options()` on lines 22-24 and 27 was added to CMake version 2.8.12 and later.\r\n\r\nCentOS 7, for example, uses cmake version 2.8.11 and fails with:\r\n```\r\n-- The CXX compiler identification is GNU 4.8.3\r\n-- Check for working CXX compiler: /usr/bin/c++\r\n-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\nCMake Error at CMakeLists.txt:22 (add_compile_options):\r\n  Unknown CMake command \"add_compile_options\".\r\n```\r\n\r\nOne option to support cmake version 2.8.0 and up is to replace line 22 - 24 with `set(CMAKE_CXX_FLAGS \"-pedantic -Wall -Wextra\")` (untested). Similar solution should work for line 27."},"comment":{"url":"https://api.github.com/repos/beltoforion/muparserx/issues/comments/150395525","html_url":"https://github.com/beltoforion/muparserx/issues/64#issuecomment-150395525","issue_url":"https://api.github.com/repos/beltoforion/muparserx/issues/64","id":150395525,"user":{"login":"guruofquality","id":184117,"avatar_url":"https://avatars.githubusercontent.com/u/184117?v=3","gravatar_id":"","url":"https://api.github.com/users/guruofquality","html_url":"https://github.com/guruofquality","followers_url":"https://api.github.com/users/guruofquality/followers","following_url":"https://api.github.com/users/guruofquality/following{/other_user}","gists_url":"https://api.github.com/users/guruofquality/gists{/gist_id}","starred_url":"https://api.github.com/users/guruofquality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guruofquality/subscriptions","organizations_url":"https://api.github.com/users/guruofquality/orgs","repos_url":"https://api.github.com/users/guruofquality/repos","events_url":"https://api.github.com/users/guruofquality/events{/privacy}","received_events_url":"https://api.github.com/users/guruofquality/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T00:36:19Z","updated_at":"2015-10-23T00:36:19Z","body":"Might also add the following:\r\n\r\n```\r\n########################################################################\r\n# Provide add_compile_options() when not available\r\n########################################################################\r\nif(CMAKE_VERSION VERSION_LESS \"2.8.12\")\r\n    function(add_compile_options)\r\n        add_definitions(${ARGN})\r\n    endfunction(add_compile_options)\r\nendif()\r\n```"}}