[CMake] [EXTERNAL] Re: execute_process appending redirected output

Belcourt, K. Noel kbelco at sandia.gov
Wed Dec 28 11:39:38 EST 2011


Hi Aaron,

On Dec 27, 2011, at 11:04 PM, Aaron Ten Clay wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 12/27/11 16:16, Belcourt, Kenneth wrote:
>> I'm trying to get CMake to execute this command
>>
>> INSTALL(CODE
>> "EXECUTE_PROCESS (COMMAND cat
> \"${CMAKE_CURRENT_SOURCE_DIR}/onejar_classpath.txt >>
> ${CMAKE_INSTALL_PREFIX}/onejar/boot-manifest.mf\")"
>> )
>>
>> but this doesn't work, here's the error I get when I run the install.
>>
>> I've checked that both the source and target files exist and are
> writable. Any ideas on how to get this to work?
>>
> It looks as thought you might be missing some escaped double-quotes.

I've tried quite a few quoting permutations, none work.

> INSTALL(CODE
> "EXECUTE_PROCESS (COMMAND cat
> \"${CMAKE_CURRENT_SOURCE_DIR}/onejar_classpath.txt\" >>
> \"${CMAKE_INSTALL_PREFIX}/onejar/boot-manifest.mf\")"
> )

Unfortunately this doesn't work.

> It's also worth noting that this is not a cross-platform command.

Yup, we're a unix only shop.

> Maybe
> look at file(READ ...) followed by file(APPEND ...)?

Looks promising, I'll check this out.

Thanks for the help Aaron.

-- Noel




More information about the CMake mailing list