Bill Hoffman wrote:

But hey CMake is open source, you can always add the code you want by yourself.

Here it is... I put some questions in the comments as I'm not that familiar with the subtleties of some cmake's commands. You probably want to clean it up. Took me too long to write (love cmake the make system and docs and platform and flexibility and support, but its language syntax....too much pain for my taste -- i never remember the commands).



As far as the other stuff...


> BTW both cygwin and msys have a ln to create symlinks:

Again, they are NOT symlinks. In the same page you sent me it clearly specifies that those are not symlinks but get translated to mount points in /etc/fstab when they are dirs. When they are files, you get a hardlink (and only if they are on NTFS!). Not the same. At least not at all to what the Unix world or Wikipedia calls symlinks. Only with *Windows Vista* you can get actual symlinks in windows, but cygwin/mingw will likely not benefit from that anytime soon as they link against an old msvcrt for legal reasons.
Either way, this is offtopic and has *nothing* to do with what I asked.

> I am not going to add code into CMake that translates POSIX's paths into windows paths. You aren't and I did not ask for that. You are always working with windows paths. The conversion is handled by MSYS for you in the PATH variable AUTOMATICALLY.

> CMake would have to be a MSYS app to understand MSYS paths.

No. But if you want to make FIND_PATH() and all the others also support MSYS mount points, be my guest. That's not what I asked for, thou.

Or was all this just a trick to get me to become a cmake developer? :)

Anyway, if you want to go down that path of an MSYS cmake, rather than linking the cygwin/mingw library, have you considered just parsing /etc/fstab now that you know where it is as far as windows is concerned? The big benefit of that is you maintain a single windows cmake that can generate all types of makefiles.

--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy

Index: Modules/Platform/Windows-gcc.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Windows-gcc.cmake,v
retrieving revision 1.19
diff -r1.19 Windows-gcc.cmake
55a56,109
> 
> FILE(TO_CMAKE_PATH $ENV{PROGRAMFILES} PROGRAMFILES )
> 
> #
> # Q:  Should CMAKE_PROJECT_NAME be used instead?
> #
> SET( PROGRAMFILES "${PROGRAMFILES}/${PROJECT_NAME}" )
> 
> IF(MSYS AND CMAKE_INSTALL_PREFIX STREQUAL "${PROGRAMFILES}")
> 	# MESSAGE( STATUS "Find MSYS ROOT" )	
> 	#
> 	# Attempt to locate MSYS root path by finding sh.exe
> 	# in users' path or from environment variable MSYS_ROOT.
> 	#
> 	IF( NOT MSYS_ROOT )
> 	  SET( MSYS_ROOT $ENV{MSYS_ROOT} )
> 	ENDIF( NOT MSYS_ROOT )
> 
> 	IF(NOT MSYS_ROOT)
> 	   FIND_PATH( MSYS_ROOT NAMES sh.exe PATHS $ENV{PATH} )
> 	   IF( NOT MSYS_ROOT )
> 	       MESSAGE( FATAL_ERROR 
> 	       "CMake could not determine MSYS root.  Please set MSYS_ROOT" )
> 	   ENDIF( NOT MSYS_ROOT)
> 
> 	   # MESSAGE( STATUS "1 ${MSYS_ROOT} " )
> 
> 	   IF( MSYS_ROOT MATCHES ".*/local/bin" )
> 	   	 SET( MSYS_ROOT "${MSYS_ROOT}/.." )
> 	   ELSE( MSYS_ROOT MATCHES ".*/local/bin" )
> 	    	 SET( MSYS_ROOT "${MSYS_ROOT}/../local" )
> 	   ENDIF( MSYS_ROOT MATCHES ".*/local/bin" )
> 
> 	   # MESSAGE( STATUS "2 ${MSYS_ROOT} " )
> 
> 	   FILE(TO_CMAKE_PATH "${MSYS_ROOT}" MSYS_ROOT)
> 	   # MESSAGE( STATUS "3 ${MSYS_ROOT} " )
> 
>         ENDIF(NOT MSYS_ROOT)
> 	
> 	#
> 	# CMake BUG:  IS_DIRECTORY should be used, but that fails with
> 	#             ../ in path.  
> 	#             Also, it would be better if we normalized the path
> 	#             first, but I could not find a function to do so.
> 	#
>         IF( NOT EXISTS ${MSYS_ROOT} )
> 	  MESSAGE( FATAL_ERROR 
> 	       "CMake uses MSYS root ${MSYS_ROOT}.  But no ${MSYS_ROOT} on disk.  Please create directory or set CMAKE_INSTALL_PREFIX or MSYS_ROOT differently." )
> 	ENDIF( NOT EXISTS ${MSYS_ROOT} )
> 
> 	SET( CMAKE_INSTALL_PREFIX ${MSYS_ROOT} )
> 
> ENDIF(MSYS AND CMAKE_INSTALL_PREFIX STREQUAL "${PROGRAMFILES}")
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to