<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>I think this is just a misunderstanding and not related to CMake.</div><div><br></div><div>Make --question mode always returns a 1 if the target is PHONY because these targets are always out of date.</div><div>The Makefiles generated by CMake use a top level PHONY target (and other PHONY targets as well)<br></div><div><br></div><div>zzz@i7-lab:~/temp/bldlibvnc$ make -q CMakeFiles/vncserver.dir/libvncserver/zrleoutstream.c.o<br>zzz@i7-lab:~/temp/bldlibvnc$ echo $?<br>0<br>zzz@i7-lab:~/temp/bldlibvnc$ make -q<br>zzz@i7-lab:~/temp/bldlibvnc$ echo $?<br>1<br></div></div><div dir="ltr"><br></div><div>OR<br></div><div dir="ltr"><br><div>zzz@i7-lab:~/temp/bldlibvnc$ make -q vncclient<br>zzz@i7-lab:~/temp/bldlibvnc$ echo $?<br>1<br>zzz@i7-lab:~/temp/bldlibvnc$ make -q libvncclient.so<br>zzz@i7-lab:~/temp/bldlibvnc$ echo $?<br>0<br></div><div><br></div><div>So you'll need to discern the actual target you want to check.</div><div><br></div><div>Best regards...</div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 27, 2018 at 11:51 AM Alex Tzonkov <<a href="mailto:alex.tzonkov@gmail.com">alex.tzonkov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="m_-5354819104541378966gmail-gs" style="margin:0px;padding:0px 0px 20px;width:1018.86px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div class="m_-5354819104541378966gmail-"><div id="m_-5354819104541378966gmail-:o5" class="m_-5354819104541378966gmail-ii m_-5354819104541378966gmail-gt" style="font-size:12.8px;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="m_-5354819104541378966gmail-:o6" class="m_-5354819104541378966gmail-a3s m_-5354819104541378966gmail-aXjCH" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif;outline:none"><div dir="ltr">We are using cmake for our project and recently discovered that the generated Makefiles do not seem to work correctly with the '--question' or '-q' option. The return code is always '1' even if there are no changes which would require rebuilding/recompiling anything. I am not sure if this is an issue with our CmakeLists.txt files or *.cmake files or a general issue with cmake. Any pointers would be greatly appreciated.<div><br></div><div>I apologize if this is an answered question, I tried really hard to search the archives, but searching for "--question" is futile, as the searches return pretty much every question. </div></div><div class="m_-5354819104541378966gmail-yj6qo"></div><div class="m_-5354819104541378966gmail-adL"></div></div></div><div class="m_-5354819104541378966gmail-hi" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px;padding:0px;width:auto;background:rgb(242,242,242);margin:0px"></div></div></div><br class="m_-5354819104541378966gmail-Apple-interchange-newline"></div>
-- <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/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/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/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/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/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>