Yep, pretty darn close. One caveat is that done this way it makes the directory in the source dir. Had to use the CMAKE_BINARY_DIR variables to make it in the build area...something I failed to mention I needed before.
Thanks a bunch! On Fri, Aug 17, 2012 at 5:42 PM, Jake Petroules <[email protected]> wrote: > This should work for you: > > file(MAKE_DIRECTORY reports) > > http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:file > > Jake Petroules > Petroules Corporation (www.petroules.com) > Email: [email protected] > Telephone: +1 (970) 587-3821 > > On Aug 17, 2012, at 8:37 PM, Noah Roberts <[email protected]> wrote: > >> I have set up a cmake structure that runs unit tests under valgrind >> and by themselves using ctest and generating xml reports for CI >> systems like Jenkins. >> >> One drawback though, the directories to store the resulting reports >> must exist before make test or make ExperimentalMemCheck are run. >> >> How would I go about running a mkdir command when, and only when cmake >> itself is run or is tying to a target the only way to go about it? >> >> I've tried to add a custom command and this doesn't seem to work: >> >> add_custom_command(OUTPUT reports COMMAND mkdir -p reports) >> >> -- >> http://crazycpp.wordpress.com >> http://crazyeddiesbrain.wordpress.com >> -- >> >> 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 > -- http://crazycpp.wordpress.com http://crazyeddiesbrain.wordpress.com -- 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
