Andreas,

I had a look at your modified files and, like the old ones, they seem to work quite well. However, there are some things that are somehow unclear to me or cause problems here:

First, in WinCE.cmake, you replace the decimal string of the system version CMAKE_SYSTEM_VERSION, which does not work in my case. Although WM5 is considered as 5.1 and WM6 as 5.2, this causes a version of 0x51 and 0x52 respectively, which should be 0x501 and 0x502, otherwise compilation fails with some error like "versions of Windows CE < 3.0 are not supported". Changing your syntax to

STRING(REGEX REPLACE "([0-9]*)\\.([0-9]*)" "0x\\10\\2" CMAKE_SYSTEM_VERSION_HEX "${CMAKE_SYSTEM_VERSION}")

fixes this in my case. I now wrote some generator for Visual Studio which only takes a cached CMAKE_SYSTEM_NAME variable and, thus selects the right toolchain. I further modified your WinCE.cmake(-cl) configuration to WM5.cmake(-cl) to contain additional flags needed. Also a cached variable PLATFORM_SDKS is used that selects only those platforms from the set of all platforms installed. This works pretty well, as one simply has to create this cache file first, and the rest works as expected. I still have to modify the original files in the modules directory responsible for the test build, because the test compile uses the right compiler in VDSIR/VC/ce/bin/x86_arm, but cannot link the test program due to a missing entry point.

I tried using your WinCE file for generating NMake Makefiles without caching anything and by typing

"cmake.exe -G"NMake Makefiles" -DCMAKE_SYSTEM_NAME=WINCE"

This fails here because it tries to link the coredll.lib trying to compile the simple test program. I'm not sure if this is the error you mentioned, because whatever I try to test-compile it tells me that he uses the cl.exe located in VSDIR/VC/bin, which is not an embedded compiler anyway. However, I'm sure that internally it uses the right compiler to compile the program, and the information message about what cl is used is simply wrong. How do you get your project configured for Makefiles?

Regards
Clemens


Andreas Pokorny schrieb:
Hi there,
I have attached a zip with slightly cleaned up WinCE and Windows
Platform files. I modified the check
that tries to decide whether cl builds for x86 or amd64, at least
thats what I thought it was doing.

Now there is a check that inspects an object file of cl, then sets
respective flags to link.exe.
The check only happens when building Makefiles, hence the /machine
linker flag is only set when
generating makefiles. I assume visual studio would do the right
thing(tm), since it should be possible
to select the SDK and platform inside the IDE, if I am not mistaken.

There are some remaining issues:
* the flag /RTC[1] is not supported by cl vs2005 for arm at least
  - is there a cmake macro that checks if a compiler flag is supported?
* when not using thumb code, one cannot use the libs provided with an
ARM SDK, hence
  setting coredll.lib and friends breaks the build
* If I am not mistaken there is yet no clean facility to specify the
libpath and include path
  from the toolchain file

Please review.

In the following days I will try to use Clemens patch for the visual
studio generators.

kind regards
Andreas Pokorny

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to