{"action":"created","issue":{"url":"https://api.github.com/repos/DGtal-team/DGtal/issues/1094","labels_url":"https://api.github.com/repos/DGtal-team/DGtal/issues/1094/labels{/name}","comments_url":"https://api.github.com/repos/DGtal-team/DGtal/issues/1094/comments","events_url":"https://api.github.com/repos/DGtal-team/DGtal/issues/1094/events","html_url":"https://github.com/DGtal-team/DGtal/issues/1094","id":124016469,"number":1094,"title":"cmake build warning with option WITH_ITK=ON","user":{"login":"phcerdan","id":3021667,"avatar_url":"https://avatars.githubusercontent.com/u/3021667?v=3","gravatar_id":"","url":"https://api.github.com/users/phcerdan","html_url":"https://github.com/phcerdan","followers_url":"https://api.github.com/users/phcerdan/followers","following_url":"https://api.github.com/users/phcerdan/following{/other_user}","gists_url":"https://api.github.com/users/phcerdan/gists{/gist_id}","starred_url":"https://api.github.com/users/phcerdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phcerdan/subscriptions","organizations_url":"https://api.github.com/users/phcerdan/orgs","repos_url":"https://api.github.com/users/phcerdan/repos","events_url":"https://api.github.com/users/phcerdan/events{/privacy}","received_events_url":"https://api.github.com/users/phcerdan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-28T04:27:04Z","updated_at":"2015-12-28T09:30:57Z","closed_at":null,"body":"When using -DWITH_ITK:BOOL=ON I have found this warning related to policy CMP0012 https://cmake.org/cmake/help/v3.0/policy/CMP0012.html\r\ncmake --version = 3.4.1 (Arch)\r\n\r\n```\r\nCMake Warning (dev) at /home/phc/devtoolset/release/VTK/lib/cmake/vtk-7.1/VTKConfig.cmake:23 (if):                                                               [25/3897]\r\n  given arguments:\r\n\r\n    \"ON\"\r\n\r\n  An argument named \"ON\" appears in a conditional statement.  Policy CMP0012\r\n  is not set: if() recognizes numbers and boolean constants.  Run \"cmake\r\n  --help-policy CMP0012\" for policy details.  Use the cmake_policy command to\r\n  set the policy and suppress this warning.\r\nCall Stack (most recent call first):\r\n  /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/Modules/ITKVtkGlue.cmake:15 (find_package)\r\n  /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/ITKModuleAPI.cmake:54 (include)\r\n  /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/ITKModuleAPI.cmake:26 (itk_module_load)\r\n  /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/ITKModuleAPI.cmake:84 (_itk_module_config_recurse)\r\n  /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/ITKConfig.cmake:73 (itk_module_config)\r\n  cmake/CheckDGtalOptionalDependencies.cmake:193 (FIND_PACKAGE)\r\n  CMakeLists.txt:39 (INCLUDE)\r\nThis warning is for project developers.  Use -Wno-dev to suppress it.\r\n\r\n-- ITK found /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/UseITK.cmake.\r\nCMake Warning (dev) at /home/phc/devtoolset/release/VTK/lib/cmake/vtk-7.1/VTKConfig.cmake:23 (if):\r\n  given arguments:\r\n\r\n    \"ON\"\r\n\r\n  An argument named \"ON\" appears in a conditional statement.  Policy CMP0012\r\n  is not set: if() recognizes numbers and boolean constants.  Run \"cmake\r\n  --help-policy CMP0012\" for policy details.  Use the cmake_policy command to\r\n  set the policy and suppress this warning.\r\nCall Stack (most recent call first):\r\n  /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/Modules/ITKVtkGlue.cmake:15 (find_package)\r\n  /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/ITKModuleAPI.cmake:54 (include)\r\n  /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/ITKModuleAPI.cmake:26 (itk_module_load)\r\n  /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/ITKModuleAPI.cmake:84 (_itk_module_config_recurse)\r\n  /home/phc/devtoolset/release/ITK/lib/cmake/ITK-4.9/ITKConfig.cmake:73 (itk_module_config)\r\n  CMakeLists.txt:8 (FIND_PACKAGE)\r\nThis warning is for project developers.  Use -Wno-dev to suppress it.\r\n\r\n```\r\nI have seen in other projects the following bypass, but probably not the best long-term solution\r\n```\r\nif(POLICY CMP0012)\r\n    cmake_policy(SET CMP0012 OLD)\r\nendif()\r\n```"},"comment":{"url":"https://api.github.com/repos/DGtal-team/DGtal/issues/comments/167523396","html_url":"https://github.com/DGtal-team/DGtal/issues/1094#issuecomment-167523396","issue_url":"https://api.github.com/repos/DGtal-team/DGtal/issues/1094","id":167523396,"user":{"login":"dcoeurjo","id":700165,"avatar_url":"https://avatars.githubusercontent.com/u/700165?v=3","gravatar_id":"","url":"https://api.github.com/users/dcoeurjo","html_url":"https://github.com/dcoeurjo","followers_url":"https://api.github.com/users/dcoeurjo/followers","following_url":"https://api.github.com/users/dcoeurjo/following{/other_user}","gists_url":"https://api.github.com/users/dcoeurjo/gists{/gist_id}","starred_url":"https://api.github.com/users/dcoeurjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcoeurjo/subscriptions","organizations_url":"https://api.github.com/users/dcoeurjo/orgs","repos_url":"https://api.github.com/users/dcoeurjo/repos","events_url":"https://api.github.com/users/dcoeurjo/events{/privacy}","received_events_url":"https://api.github.com/users/dcoeurjo/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T09:30:57Z","updated_at":"2015-12-28T09:30:57Z","body":"If so, maybe we can just disable the warning during the VTK discovery and set it back after. "}}