[CMake] WinCE Support
Clemens Arth
clemens.arth at gmx.at
Mon Mar 30 07:21:36 EDT 2009
Bill Hoffman schrieb:
> Andreas Pokorny wrote:
>> Hello,
>>
>> 2009/3/23 Bill Hoffman <bill.hoffman at kitware.com>:
>> [..]
>>> Basically, something that runs the new code. Compile a WinCE
>>> project, and
>>> somehow verify that it compiled it correctly.
>>
>> So we need a couple of source files that pull in at least some basic
>> API headers.. and
>> a script file to run cmake and trigger the build?
>> ( To execute the test you would need the non-free version of vs2005
>> or newer
>> and at least one CE SDK installed - and maybe have some env vars set)
>>
>
> See the Tests directory in CMake source to see how to setup a test.
> Basically, it is just a fully independent CMake project. We run ctest
> --build-and-test to compile it.
>
> -Bill
>
Hi,
I have now tried to write a simple test for the framework which was a
litte more difficult than I thought first. Anyway, I have uploaded the
patch against 2.6.3 on the bug report page.
I could not figure out exactly how to include a cross-compiling test in
the Tests/CMakeLists.txt file in a clever and nice way, such that it
finds out if automatically if Visual Studio 2005 and/or 2008 is
installed or neither. Thus my test hack is really ugly although I tried
to get it somewhat nicer for a few days now - if someone could rewrite
it in a nice fashion I'd be really glad.
First a cache file is copied to the build folder. First I thought
setting the correct CMAKE_GENERATOR in the Cache file should be
sufficient, but whatever I did configuring the project failed. Thus I
think the --build-generator flag must be provided to make it work, which
makes everything more complicated (finding out what compiler is
installed!?). Because I could not find a workaround to this, I simply
assume VS 2008 to be installed and I hardcoded --build-generator to
"Visual Studio 9 2008 (with SDK support)". This means running the test
only works if 2008 is installed. It simply creates a PPC 2003 sample
project and compiles it in Release and Debug, which worked out fine for
me. There is currently only the possibility to build, because executing
and testing would involve interfacing the simulator which I guess is far
too tough to be included here.
I'm open for any suggestions and comments to improve the current state
to something which is really useable.
Regards
Clemens
More information about the CMake
mailing list