<div dir="auto">Hi Brian,<div dir="auto"><br></div><div dir="auto">What is the version passed to cmake_minimum_required for your project? (Typically the first line in your top-level CMakeLists.txt).</div><div dir="auto"><br></div><div dir="auto">I suspect if you set it to a version higher than 3.1 the warnings will disappear (I believe it is set to a version older than that, hence the policy warnings).</div><div dir="auto"><br></div><div dir="auto">Regards</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 9 Aug 2017 7:27 pm, "Brian Davis" <<a href="mailto:bitminer@gmail.com">bitminer@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><br clear="all"></div>I am so lost in CMB0054 errors I and internet searches I can't remember why I wanted Itk-4.8 in the first place.  Here goes:<br><br></div>When using CMake 3.9.0-rc6 or basically 3.1+ (onward) and trying:<br><br>        find_package( ITK )<br><br></div>with 4.8 built / installed and receiving: <br><br><span style="color:rgb(255,0,0)">CMake Warning (dev) at install/lib/cmake/ITK-4.8/<wbr>ITKTargets.cmake:28 (if):<br>  Policy CMP0054 is not set: Only interpret if() arguments as variables or<br>  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy<br>  details.  Use the cmake_policy command to set the policy and suppress this<br>  warning.<br><br>  Quoted variables like "" will no longer be dereferenced when the policy is<br>  set to NEW.  Since the policy is not set the OLD behavior will be used.<br>Call Stack (most recent call first):<br>  install/lib/cmake/ITK-4.8/<wbr>ITKConfig.cmake:50 (include)<br>  subprojects/ctutil/CMake/<wbr>ctutil/itk/itk_config.cmake:<wbr>137 (find_package)<br>  subprojects/ctutil/CMake/<wbr>ctutil/Findctutil.cmake:224 (itk_config)<br>  CMakeLists.txt:123 (find_package)<br>This warning is for project developers.  Use -Wno-dev to suppress it.<br></span>
<p style="margin:0px;text-indent:0px"><span style="color:rgb(255,0,0)">CMake Warning (dev) at install/lib/cmake/ITK-4.8/<wbr>ITKTargets.cmake:36 (if):<br>  Policy CMP0054 is not set: Only interpret if() arguments as variables or<br>  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy<br>  details.  Use the cmake_policy command to set the policy and suppress this<br>  warning.<br><br>  Quoted variables like "" will no longer be dereferenced when the policy is<br>  set to NEW.  Since the policy is not set the OLD behavior will be used.<br>Call Stack (most recent call first):<br>  install/lib/cmake/ITK-4.8/<wbr>ITKConfig.cmake:50 (include)<br>  subprojects/ctutil/CMake/<wbr>ctutil/itk/itk_config.cmake:<wbr>137 (find_package)<br>  subprojects/ctutil/CMake/<wbr>ctutil/Findctutil.cmake:224 (itk_config)<br>  CMakeLists.txt:123 (find_package)<br>This warning is for project developers.  Use -Wno-dev to suppress it.</span></p><p style="margin:0px;text-indent:0px"><span style="color:rgb(255,0,0)"></span></p><div><br></div><div>then looking at line 28 in <span style="color:rgb(255,0,0)">install/lib/cmake/ITK-4.8/<wbr>ITKTargets.cmake:28</span><br><br>if("${_targetsDefined}" STREQUAL "${_expectedTargets}")<br><br></div><div></div><div><br></div><div>then reading:<br><div><br><a href="https://cmake.org/cmake/help/v3.1/policy/CMP0054.html" target="_blank">https://cmake.org/cmake/help/<wbr>v3.1/policy/CMP0054.html</a><br><br></div><div>I always new CMake was and is broken (language, use, and documentation), but never such a realization as now.<br></div><div><br></div><div>and bits like<br><br><a href="https://cmake.org/pipermail/cmake/2014-December/059317.html" target="_blank">https://cmake.org/pipermail/<wbr>cmake/2014-December/059317.<wbr>html</a><br><a href="https://cmake.org/cmake/help/v3.1/command/cmake_policy.html#command:cmake_policy" target="_blank">https://cmake.org/cmake/help/<wbr>v3.1/command/cmake_policy.<wbr>html#command:cmake_policy</a><br><br></div><div>then ...sigh... then trying:<br><br>        cmake_policy(PUSH)<br>        cmake_policy(SET CMP0054 OLD)<br>        find_package( ITK )<br>        cmake_policy(POP)<br><br></div><div>and still getting:<br></div><div><br><span style="color:rgb(255,0,0)">CMake Warning (dev) at install/lib/cmake/ITK-4.8/<wbr>ITKTargets.cmake:28 (if):<br>  Policy CMP0054 is not set: Only interpret if() arguments as variables or<br>  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy<br>  details.  Use the cmake_policy command to set the policy and suppress this<br>  warning.</span><br><br></div><div>and wondering does the cmake_policy push, pop, set do anything here?  <br><br></div><div>I am left wondering who, what, why am I here? Maybe Sigourney Weaver can help (see title).<br></div><div><br>from: <br><br><a href="https://en.wikipedia.org/wiki/CMake" target="_blank">https://en.wikipedia.org/wiki/<wbr>CMake</a><br><br>"CMake development began in 1999 in response to the need for a cross-platform build environment for the Insight Segmentation and Registration Toolkit (ITK)"<br><br></div><div>If only I could get CMake to work with the package it was originally created to build.<br></div><div><br></div></div></div>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br></blockquote></div></div>