[CMake] cmake 2.8.2 win32: invalid escape sequence when finding fortran compiler

John Drescher drescherjm at gmail.com
Wed Jul 14 12:46:56 EDT 2010


> Be careful with your use of $ENV{PROGRAMFILES} - it might not give you what
> you expect on a 64-bit computer. Since the CMake binary is by default
> 32-bit, you need some logic to make sure you're looking where you think
> you're looking.
>

I had that covered. I just shortened the example not to confuse the OP.

	IF(CMAKE_SIZEOF_VOID_P MATCHES 4)
	string (REPLACE "\\" "/" PGM_FILES $ENV{PROGRAMFILES})
	ELSE(CMAKE_SIZEOF_VOID_P MATCHES 4)
	# On WIN64 use the 64 bit program files..
	string (REPLACE "\\" "/" PGM_FILES $ENV{ProgramW6432})
	ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 4)

John


More information about the CMake mailing list