Re: [CMake] Idea: generic task-driven make-like targets with CMake

2015-12-09 Thread Kevin Wojniak
Looks interesting Tamas! Too bad shell scripts don’t work natively on Windows :) Kevin On 8 Dec 2015, at 16:59, Tamás Kenéz wrote: Kevin, I have a shell script for such tasks, see https://gist.github.com/tamaskenez/d4509f240f4224eb9853. Feel free to use it if that's what you need. It

Re: [CMake] Idea: generic task-driven make-like targets with CMake

2015-12-09 Thread Tamás Kenéz
[getting offtopic] Well, not because of this script but for any serious development on Windows I think it's a good idea to use the *nix shell provided by the Windows Git installation, it feels quite native. Together with cbucher's ConsoleZ you get a very convenient environment for

[CMake] Idea: generic task-driven make-like targets with CMake

2015-12-08 Thread Kevin Wojniak
The one thing I’ve found I still have to replace with CMake is the ability to specify generic “make” targets that do various tasks, such as a release build using the same build directory, run tests, grab dependencies. For example, with Make I can do: release: mkdir -p build_dir cd

Re: [CMake] Idea: generic task-driven make-like targets with CMake

2015-12-08 Thread Nils Gladitz
On 08.12.2015 19:04, Kevin Wojniak wrote: add_task(release COMMAND ${CMAKE_COMMAND} -E make_directory “build_dir” COMMAND ${CMAKE_COMMAND} -E chdir “build_dir” ${CMAKE_COMMAND} “-DCMAKE_BUILD_TYPE=Release”, “..” ) There is add_custom_target(). You can e.g.

Re: [CMake] Idea: generic task-driven make-like targets with CMake

2015-12-08 Thread Kevin Wojniak
Functionality like add_custom_target combined with script mode is close, but not quite there. add_custom_target already requires a build directory and a generator, so it’s too late. Script mode requires setting variables on the command line, so it’s too verbose. For example: if(“${ACTION}”

Re: [CMake] Idea: generic task-driven make-like targets with CMake

2015-12-08 Thread Tamás Kenéz
Kevin, I have a shell script for such tasks, see https://gist.github.com/tamaskenez/d4509f240f4224eb9853. Feel free to use it if that's what you need. It extends the `cmake` command by executing multiple, related `cmake` calls with one command. See docs in gist. Your 'make release' example looks