[CMake] CTest: Handle output of a custom CTEST_CONFIGURE_COMMAND

2016-03-16 Thread Matějů Miroslav , Ing .
Hi, I am using CTest to encapsulate automatic build and testing of a microcontroller software and report results to CDash. This process generally works but I am facing a problem with handling configure errors within CTest and CDash. Configure phase involves several tools besides CMake, so I ha

Re: [CMake] Parsing command line arguments from the make

2016-04-05 Thread Matějů Miroslav , Ing .
Hi Fedja, As far as I know, the Makefiles generated from CMake cannot contain decisions. CMake supports several output types aside from Makefiles and some of them probably don’t support decisions. However, you could supply these arguments within CMake call using -D option. For example cmak

Re: [CMake] issue with target_link_libraries and MSVC

2016-04-12 Thread Matějů Miroslav , Ing .
Hi Benjamin, MSVC flags start with “forward” slashes: / (However, MSVC also accepts hyphens (-) in my experience.) Documentation for /openmp flag: https://msdn.microsoft.com/library/fw509c3b.aspx Best regards, Miroslav From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Benjamin Ballet vi

Re: [CMake] issue with target_link_libraries and MSVC

2016-04-13 Thread Matějů Miroslav , Ing .
The page I linked says /openmp is a compiler flag (not linker flag), so adding it to CMAKE_CXX_FLAGS instead of LINK_FLAGS makes perfect sense. Miroslav From: Benjamin Ballet [mailto:bbal...@ivsweb.com] Sent: Wednesday, April 13, 2016 11:28 AM To: Matějů Miroslav, Ing. Cc: cmake@cmake.org

Re: [CMake] CMakeLists.txt: How to print a message if ctest fails?

2016-04-18 Thread Matějů Miroslav , Ing .
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 F

Re: [CMake] CMakeLists.txt: How to print a message if ctest fails?

2016-04-19 Thread Matějů Miroslav , Ing .
{CTEST_BUILD_NAME} failed.") # sets return value to -1 endif(configure_failed OR build_failed OR test_failed) Best regards, Miroslav From: Muhammad Osama [mailto:osam...@gmail.com] Sent: Monday, April 18, 2016 8:33 PM To: Matějů Miroslav, Ing. Cc: cmake@cmake.org Subject: Re: [CMake] CMakeLists.

Re: [CMake] How to use CMake with Eclipse CDT?

2016-04-20 Thread Matějů Miroslav , Ing .
Hi David, Generation of project files in CMake is a one-way process. CMake is not able to edit its own input (CMakeLists.txt). To update a project managed by CMake, you should update CMakeLists.txt manually and regenerate your CDT project. Best regards, Miroslav From: CMake [mailto:cmake-boun

[CMake] CTest model deviates from the requsted one

2017-09-12 Thread Matějů Miroslav , Ing .
Hi, I would like to report the following problem. I experienced that CTest running a CTestScript with a manually specified model (e.g. CTEST_START(Experimental)) sometimes deviates from the selected model. For example, when the test model Nightly is requested, the test sometimes gets reported t

Re: [CMake] Visual Studio 2017

2017-09-15 Thread Matějů Miroslav , Ing .
Hello Randy, From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Randy Heiland Sent: Friday, September 15, 2017 1:38 PM > Is there a "best way" to use cmake for VS17 (but same cakelists for Linux)? > And by "best", I mean with minimal effort on users. > To be more specific, on Windows, I *