[CMake] Problems with execute_process under Windows

Tanguy Krotoff tkrotoff at gmail.com
Sun May 10 11:48:07 EDT 2009


Hello

I'm pulling my hair out on what should be straightforward.

	file(TO_NATIVE_PATH ${file} file_native)
	execute_process(
		COMMAND type \"${file_native}\"
		RESULT_VARIABLE result
		OUTPUT_VARIABLE output
		ERROR_VARIABLE error
	)
	message("result=${result}")
	message("output=${output}")
	message("error=${error}")

I'm running this under Windows and it gave me this output:

result=0
output=
error="C:\Documents and
Settings\tanguy_k\Desktop\phonon-vlc-mplayer\trunk\AUTHORS" not found

Of course the file exist and if i enter
	type "C:\Documents and
Settings\tanguy_k\Desktop\phonon-vlc-mplayer\trunk\AUTHORS"
inside a DOS command prompt everything works fine.

It's like CMake does something to the filename that I don't understand

Any idea why?
Is there any way to show the real command that CMake tries to run?

-- 
Tanguy Krotoff <tkrotoff at gmail.com>
+33 6 68 42 70 24


More information about the CMake mailing list