Hi Miroslav, Thank you for replying! I added this in my root CMakeLists.txt, purposely made the ctest's test fail but didn't get the output message. Is this script suppose to be added inside CMakeLists.txt? Or am I doing this incorrectly?
Thanks again, On Mon, Apr 18, 2016 at 6:30 AM, Matějů Miroslav, Ing. < mateju.miros...@azd.cz> wrote: > Hi Muhammad, > > you can use a CTest script, see > https://cmake.org/Wiki/CMake_Scripting_Of_CTest for details. I use the > following code in my CTest script: > > > > if(configure_failed OR build_failed OR test_failed) > > message(FATAL_ERROR "Test ${CTEST_BUILD_NAME} failed.") > > endif() > > > > Best regards, > > Miroslav > > > > *From:* CMake [mailto:cmake-boun...@cmake.org] *On Behalf Of *Muhammad > Osama > *Sent:* Friday, April 15, 2016 8:53 PM > *To:* cmake@cmake.org > *Subject:* [CMake] CMakeLists.txt: How to print a message if ctest fails? > > > > Is there a way I can setup CMakeLists.txt to print a message if ctest > tests fail? For example: > > cmake .. > make > ctest // fails > message output: Please contact x...@mail.com to resolve testing problems. > > Note the message output is not for cmake but for ctest. > > > > -- > > Muhammad > -- *Muhammad*
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake