On 01-Jul-16 00:02, Brad King wrote:
On 06/30/2016 04:57 PM, Shawn Waldon wrote:
     mkdir -p "$build" && pushd "$build" && cmake "$src" && popd
Or use a ()-enclosed subshell:

  (mkdir -p "$build" && cd "$build" && cmake "$src")

-Brad

Okay, this one seems to work. Also you haven't show how `src` defined, e.g. I can't do 'src=.' so it should be src="`pwd`"

So instead of "cmake -H. -B_builds" we have (src="`pwd`" build=_builds mkdir -p "$build" && cd "$build" && cmake "$src")
And it's only for *nix.

What about Windows?

Such options definitely would be useful in CMake.

Ruslo


--

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-developers

Reply via email to