[CMake] add_test CONFIGURATIONS and linux
[Re-sending in text-form] Hi, I'm failing to be able to use "run-only-in-release" tests when running under linux (Debian). Below is a short reproduction. CmakeLists.txt = cmake_minimum_required(VERSION 3.0) enable_testing() add_test(NAME list-stuff CONFIGURATIONS Release COMMAND ls) = My understanding is that test will run only when the "configuration" is release. I am guessing that for the single-configuration Makefile generator, this is true when CMAKE_BUILD_TYPE=Release. Correct? Doesn't work for me: Run Script == steve@riemann{build}rm -rf * steve@riemann{build}cmake --version cmake version 3.6.2 CMake suite maintained and supported by Kitware (kitware.com/cmake). steve@riemann{build}cmake -D CMAKE_BUILD_TYPE=Release .. -- The C compiler identification is GNU 6.2.0 -- The CXX compiler identification is GNU 6.2.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /home/steve/src/test/cmake/build steve@riemann{build}make steve@riemann{build}make test Running tests... Test project /home/steve/src/test/cmake/build No tests were found!!! steve@riemann{build} == Where am I going wrong? Thanks! -Steve P.S. After writing this, I discovered that "ctest -C Release" will run the tests as desired. Why doesn't simple "make test" work? -- 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
[CMake] add_test CONFIGURATIONS and linux
Hi, I'm failing to be able to use "run-only-in-release" tests when running under linux (Debian). Below is a short reproduction. CmakeLists.txt = cmake_minimum_required(VERSION 3.0) = CMAKE_BUILD_TYPE=Release. Correct? Doesn't work for me: Run Script == steve@riemann{build}rm -rf * Running tests... Where am I going wrong? Thanks! -Steve P.S. After writing this, I discovered that "ctest -C Release" will run the tests as desired. Why doesn't simple "make test" work? signature.asc Description: This is a digitally signed message part. -- 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
Re: [CMake] parallel build using cmake --build?
On Sat, Nov 26, 2011 at 10:46:10AM -0500, John Drescher wrote: On Fri, Nov 25, 2011 at 10:16 PM, Steve M. Robbins st...@sumost.ca wrote: Hi, To build VTK on our windows build server, I wrote a small batch script that invokes cmake --build. My developer machine is multicore; is there a way to get cmake --build to run multiple jobs? On windows, I use the following tool http://www.codeproject.com/KB/cpp/runjobs.aspx to build each configuration (Debug, Release, RelWithDebInfo ...) in parallel using separate calls to cmake --build. Thanks -- that's great tip. In my present case, however, I'm building just the Release configuration and was hoping to parallelize that with the equivalent of make -jN. To Michael Hertling's comment: cmake --build is just a front-end for the native build tool CMake generates input for. If this tool can be invoked via the command line with options for parallel building, you can provide them after the -- in the cmake --build command, e.g. cmake --build bindir -- -j 4 for parallel building with Makefiles. I would do this if I were using makefiles. In the present case, I'm using Microsoft VS2010. I was kind of hoping that cmake had abstracted the parallelism so that I could stay ignorant of the Visual Studio command line details and possibly in future write build scripts that are cross-platform. Thanks, -Steve signature.asc Description: Digital signature -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] parallel build using cmake --build?
Hi, To build VTK on our windows build server, I wrote a small batch script that invokes cmake --build. My developer machine is multicore; is there a way to get cmake --build to run multiple jobs? Thanks, -Steve signature.asc Description: Digital signature -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Why drop -D from wxWidgets_DEFINITIONS ?
Hi, The FindwxWidget.cmake module in 2.8 is breaking the build of MRIConvert [1] because it strips -D from the output of wx-config --cxxflags. Is this not a bug? This question was asked here last October [2] but not answered. Thanks, -Steve [1] http://lcni.uoregon.edu/~jolinda/MRIConvert/ [2] http://www.cmake.org/pipermail/cmake/2009-October/032831.html signature.asc Description: Digital signature ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Boost.Test, cmake, and visual studio
Hi again, I found the answer to my problem in the CMake FAQ. Hurray! On Wed, Aug 29, 2007 at 09:19:51AM -0500, Steve M. Robbins wrote: Reluctantly, I gave up and went back to ADD_CUSTOM_TARGET. The following gives me exactly what I want: [...] The clue I needed was GET_TARGET_PROPERTY. The following does just what I want, including the dependency. ADD_EXECUTABLE( testSuite ${testSuite_SRCS} ) GET_TARGET_PROPERTY( testSuite_EXE testSuite LOCATION ) ADD_CUSTOM_TARGET( RUN_TESTS ${testSuite_EXE} --report_level=no DEPENDS testSuite ) Cheers, -Steve signature.asc Description: Digital signature ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake