[CMake] cmake for cygwin at 64bit
marco atzeri
marco.atzeri at gmail.com
Fri Mar 15 07:17:37 EDT 2013
Dear Bill,
we are starting to port packages on cygwin at 64 bit
http://cygwin.com/ml/cygwin-apps/2013-03/msg00070.html
Of course a cmake version for that platform will be helpful;
I tried to build the current source and the first obstacle is that
the deprecated "cygwin_conv_to_win32_path" function is not
available anymore.
I tried to replace it with "cygwin_conv_path" but it seems I am missing
something as on both 64 and 32 bit versions the outcome is:
CMake Error: CMake executable cannot be found at /cmake.exe
CMake Error: Error executing cmake::LoadCache(). Aborting.
I added two printf, to check my changes;
the conversion seems right
posix path /pub/devel/cmake/cmake-2.8.9/.build/Bootstrap.cmk/cmake.com
win32 path
E:\cygwin\pub\devel\cmake\cmake-2.8.9\.build\Bootstrap.cmk\cmake.com
posix path /pub/devel/cmake/cmake-2.8.9/.build/Bootstrap.cmk/cmake.exe
win32 path
E:\cygwin\pub\devel\cmake\cmake-2.8.9\.build\Bootstrap.cmk\cmake.exe
posix path /pub/devel/cmake/cmake-2.8.9/.build/Bootstrap.cmk/cmake
win32 path
E:\cygwin\pub\devel\cmake\cmake-2.8.9\.build\Bootstrap.cmk\cmake
file is there
$ ls -l /pub/devel/cmake/cmake-2.8.9/.build/Bootstrap.cmk/cmake.exe
-rwxr-xr-x 1 marco Administrators 5733380 Mar 15 09:34
/pub/devel/cmake/cmake-2.8.9/.build/Bootstrap.cmk/cmake.exe
and it is a working binary, as direct execution gives :
$ /pub/devel/cmake/cmake-2.8.9/.build/Bootstrap.cmk/cmake.exe
Bootstrap CMake should not be used outside CMake build process.
So I am clearly missing something else .
Any idea ?
Marco
-------------- next part --------------
--- orig/cmake-2.8.9/Source/kwsys/SystemTools.cxx 2012-08-15 21:28:03.000000000 +0200
+++ cmake-2.8.9/Source/kwsys/SystemTools.cxx 2013-03-15 09:33:39.928041000 +0100
@@ -85,7 +85,8 @@
#endif
#ifdef __CYGWIN__
-extern "C" void cygwin_conv_to_win32_path(const char *path, char *win32_path);
+#include <sys/cygwin.h>
+extern "C" ssize_t cygwin_conv_path( cygwin_conv_path_t what, const void * from, void * to, size_t size );
#endif
// getpwnam doesn't exist on Windows and Cray Xt3/Catamount
@@ -1123,7 +1124,20 @@
}
else
{
- cygwin_conv_to_win32_path(path, win32_path);
+ ssize_t size;
+ size=cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, NULL, 0 );
+ if (size < 0)
+ perror ("cygwin_conv_path");
+ else
+ {
+ win32_path= (char *) malloc (size);
+ if (cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, win32_path, size ))
+ perror ("cygwin_conv_path");
+ }
+
+ printf(" posix path %s\n", path);
+ printf(" win32 path %s\n", win32_path);
+
SystemToolsTranslationMap::value_type entry(path, win32_path);
SystemTools::Cyg2Win32Map->insert(entry);
}
More information about the CMake
mailing list