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

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to