[CMake] cmake 2.8.2 win32: invalid escape sequence when finding fortran compiler
Ryan Pavlik
rpavlik at iastate.edu
Wed Jul 14 12:37:57 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.
See also:
http://public.kitware.com/Bug/view.php?id=9992 - related CMake bug with
patch: contains some cmake script code to figure out what program files env
var is appropriate to search given the *build type* (32-bit or 64-bit)
regardless of the bit mode of the CMake executable itself.
http://en.wikipedia.org/wiki/Environment_variable#System_path_variables -
explanation of the numerous ProgramFiles variables on a 64-bit system.
Ryan
On Wed, Jul 14, 2010 at 11:08 AM, Eric Noulard <eric.noulard at gmail.com>wrote:
> 2010/7/14 John Drescher <drescherjm at gmail.com>:
> > On Wed, Jul 14, 2010 at 11:15 AM, Verweij, Arjen <VerweijA at tass-safe.com>
> wrote:
> >> Hi,
> >>
> >>>
> >>>You seem to have a path using \ instead of /
> >>>
> >>
> >> Isn't that to be expected of a PATH setting on a Windows computer?
> >> Anyway, the path to the Visual Studio compiler is of the same format and
> cmake deals with it just fine.
> >>
> >
> > I use / for all paths inside my CMakeLists.txt files even on windows
> > computers. If I am grabbing paths from the environment I use a string
> > replace in the CMakeLists.txt
> >
> > string (REPLACE "\\" "/" PGM_FILES $ENV{PROGRAMFILES})
>
> file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" PGM_FILES)
>
> should work as well.
>
> see the file command for details.
>
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
> _______________________________________________
> 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
>
--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University
rpavlik at iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100714/7e738e2a/attachment.htm>
More information about the CMake
mailing list