[CMake] cmake 2.8.2 win32: invalid escape sequence when finding fortran compiler
Bill Hoffman
bill.hoffman at kitware.com
Wed Jul 14 13:11:15 EDT 2010
On 7/14/2010 12:46 PM, John Drescher wrote:
>> 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
I think this is a bit off topic from the original post...
The post had this:
-- Detecting CXX compiler ABI info - done
-- Check for working Fortran compiler using: Visual Studio 7 .NET 2003
CMake Error at CMakeLists.txt:4 (SET):
Syntax error in cmake code at
S:/mnt/usr3/people/verweija/build/CMakeFiles/CMakeTmp/CMakeLists.txt:4
when parsing string
C:\Program
Invalid escape sequence \P
So, the try-compile for the fortran compiler is creating a bad
CMakeLists.txt file for some reason. My guess is an environment
variable for FFLAGS, LDFLAGS or some other env CMake might be directly
using in that file. So, a --debug-trycompile is needed.
-Bill
More information about the CMake
mailing list