Re: [CMake] Spaces in a command

2014-08-03 Thread Glenn Coombs
Not for me it doesn't: $ make VERBOSE=yes /usr/bin/cmake -H/home/glenn/src/cmake-test -B/home/glenn/src/cmake-test/build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /home/glenn/src/cmake-test/build/CMakeFiles /home/glenn/src/cmake-test/build/CMakeFiles/p

Re: [CMake] Spaces in a command

2014-07-29 Thread Bill Newcomb
On linux, at least, this results in there being double quotes around the ||, which causes it to not be interpreted by the shell. B. On 07/29/2014 12:25 PM, Glenn Coombs wrote: I think this works like you want: cmake_minimum_required(VERSION 2.6) set(DO_RELAX 1) if(DO_RELAX) set(OR_RELAX

Re: [CMake] Spaces in a command

2014-07-29 Thread Glenn Coombs
I think this works like you want: cmake_minimum_required(VERSION 2.6) set(DO_RELAX 1) if(DO_RELAX) set(OR_RELAX || echo \"no big deal\") else() set(OR_RELAX) endif() add_custom_command(OUTPUT foo COMMAND generate-foo ${OR_RELAX} VERBATIM) add_custom_target(do-foo ALL DEPENDS foo) -- Gl

Re: [CMake] Spaces in a command

2014-07-29 Thread J Decker
can try removing the quotes and subst space for semicolon? On Tue, Jul 29, 2014 at 11:13 AM, Bill Newcomb wrote: > That doesn't work either: > > foo: > $(CMAKE_COMMAND) -E cmake_progress_report > /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles $(CMAKE_PROGRESS_1) > @$(CMAKE_

Re: [CMake] Spaces in a command

2014-07-29 Thread Bill Newcomb
That doesn't work either: foo: $(CMAKE_COMMAND) -E cmake_progress_report /home/bnewcomb/tmp/cmake-tests/custom-or/CMakeFiles $(CMAKE_PROGRESS_1) @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating foo" generate-foo "|| echo \"no big deal\""

Re: [CMake] Spaces in a command

2014-07-25 Thread Iosif Neitzke
"If VERBATIM is given then all arguments to the commands will be escaped properly for the build tool so that the invoked command receives each argument unchanged. Note that one level of escapes is still used by the CMake language processor before add_custom_command even sees the arguments. Use of V

[CMake] Spaces in a command

2014-07-25 Thread Bill Newcomb
I want to add stuff to a custom command based on some definition: cmake_minimum_required(VERSION 2.6) set(DO_RELAX 1) if(DO_RELAX) set(OR_RELAX "|| echo \"no big deal\"") else() set(OR_RELAX "") endif() add_custom_command(OUTPUT foo COMMAND generate-foo ${OR_RELAX}) add_custom_target(do-