{"action":"created","issue":{"url":"https://api.github.com/repos/ComputationalRadiationPhysics/cmake-modules/issues/8","labels_url":"https://api.github.com/repos/ComputationalRadiationPhysics/cmake-modules/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/ComputationalRadiationPhysics/cmake-modules/issues/8/comments","events_url":"https://api.github.com/repos/ComputationalRadiationPhysics/cmake-modules/issues/8/events","html_url":"https://github.com/ComputationalRadiationPhysics/cmake-modules/pull/8","id":97015982,"number":8,"title":"Find mallocMC: Prefer Paths over Default Paths","user":{"login":"ax3l","id":1353258,"avatar_url":"https://avatars.githubusercontent.com/u/1353258?v=3","gravatar_id":"","url":"https://api.github.com/users/ax3l","html_url":"https://github.com/ax3l","followers_url":"https://api.github.com/users/ax3l/followers","following_url":"https://api.github.com/users/ax3l/following{/other_user}","gists_url":"https://api.github.com/users/ax3l/gists{/gist_id}","starred_url":"https://api.github.com/users/ax3l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ax3l/subscriptions","organizations_url":"https://api.github.com/users/ax3l/orgs","repos_url":"https://api.github.com/users/ax3l/repos","events_url":"https://api.github.com/users/ax3l/events{/privacy}","received_events_url":"https://api.github.com/users/ax3l/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ComputationalRadiationPhysics/cmake-modules/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"psychocoderHPC","id":4037125,"avatar_url":"https://avatars.githubusercontent.com/u/4037125?v=3","gravatar_id":"","url":"https://api.github.com/users/psychocoderHPC","html_url":"https://github.com/psychocoderHPC","followers_url":"https://api.github.com/users/psychocoderHPC/followers","following_url":"https://api.github.com/users/psychocoderHPC/following{/other_user}","gists_url":"https://api.github.com/users/psychocoderHPC/gists{/gist_id}","starred_url":"https://api.github.com/users/psychocoderHPC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psychocoderHPC/subscriptions","organizations_url":"https://api.github.com/users/psychocoderHPC/orgs","repos_url":"https://api.github.com/users/psychocoderHPC/repos","events_url":"https://api.github.com/users/psychocoderHPC/events{/privacy}","received_events_url":"https://api.github.com/users/psychocoderHPC/received_events","type":"User","site_admin":false},"milestone":null,"comments":13,"created_at":"2015-07-24T09:50:32Z","updated_at":"2015-07-28T14:28:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ComputationalRadiationPhysics/cmake-modules/pulls/8","html_url":"https://github.com/ComputationalRadiationPhysics/cmake-modules/pull/8","diff_url":"https://github.com/ComputationalRadiationPhysics/cmake-modules/pull/8.diff","patch_url":"https://github.com/ComputationalRadiationPhysics/cmake-modules/pull/8.patch"},"body":"As documented in the `find_package` manual, adding `NO_DEFAULT_PATH`\r\nallows to prefer PATHS over defaults such as the environment's\r\n~~`MALLOCMC_ROOT` or the~~ `CMAKE_PREFIX_PATH` (both can be\r\nset by users or a module system and might contain a valid,\r\nbut outdated version of mallocMC).\r\n  http://www.cmake.org/cmake/help/v3.0/command/find_path.html\r\n\r\nBetween two `find_packages`, the user should clean the cached\r\nresult from it's `find_path` via\r\n```cmake\r\nfind_package(mallocMC 2.1.0 QUIET)\r\n\r\nif(NOT mallocMC_FOUND)\r\n  # remove cache results, e.g., of an outdated version\r\n  unset(mallocMC_ROOT_DIR CACHE)\r\n\r\n  message(STATUS \"Using mallocMC from thirdParty/ directory\")\r\n  set(MALLOCMC_ROOT \"${CMAKE_CURRENT_SOURCE_DIR}/../../thirdParty/mallocMC\")\r\n  find_package(mallocMC 2.1.0 REQUIRED)\r\nendif(NOT mallocMC_FOUND)\r\n```\r\n\r\nsee: http://stackoverflow.com/a/16309871\r\n\r\nThe CMake `MALLOCMC_ROOT` is still preferred over the environment `MALLOCMC_ROOT` (which is a good thing)."},"comment":{"url":"https://api.github.com/repos/ComputationalRadiationPhysics/cmake-modules/issues/comments/125627117","html_url":"https://github.com/ComputationalRadiationPhysics/cmake-modules/pull/8#issuecomment-125627117","issue_url":"https://api.github.com/repos/ComputationalRadiationPhysics/cmake-modules/issues/8","id":125627117,"user":{"login":"ax3l","id":1353258,"avatar_url":"https://avatars.githubusercontent.com/u/1353258?v=3","gravatar_id":"","url":"https://api.github.com/users/ax3l","html_url":"https://github.com/ax3l","followers_url":"https://api.github.com/users/ax3l/followers","following_url":"https://api.github.com/users/ax3l/following{/other_user}","gists_url":"https://api.github.com/users/ax3l/gists{/gist_id}","starred_url":"https://api.github.com/users/ax3l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ax3l/subscriptions","organizations_url":"https://api.github.com/users/ax3l/orgs","repos_url":"https://api.github.com/users/ax3l/repos","events_url":"https://api.github.com/users/ax3l/events{/privacy}","received_events_url":"https://api.github.com/users/ax3l/received_events","type":"User","site_admin":false},"created_at":"2015-07-28T14:28:03Z","updated_at":"2015-07-28T14:28:03Z","body":"@PrometheusPi thx for reporting the problem with cmake `2.8.10.2`!"}}