Re: [CMake] Generator for NetBeans 6.9

2010-05-31 Thread Sebastian Meier
Hi Bill,

> Can NetBeans be driven from the command line?  That is a requirement for 
> getting try_compile to work.  

No, I don't think it is possible call NetBeans via command line in order to 
build targets. But since NetBeans relies on external tool chains like gcc, 
MinGW  or CygWin, is this really necessary?


-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
___
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

[CMake] CTest -D MemoryCheck

2010-05-31 Thread Marcel Loose
Hi all,

I'm facing the following problem. All our unit tests are run through a
Bash script. This script is responsible for setting up the environment
prior to running the actual test; e.g., it copies input files and
reference output files, after the test has run it compares outputs, etc.

When running 'ctest -D MemoryCheck' I face the problem that not my test
program but the wrapper script is memory checked by valgrind. Of course,
I can let valgrind also trace its child processes, but that produces
enormous amounts of noise and slows down testing unnecessarily. Is there
another way to solve this?

Best regards,
Marcel Loose.


___
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


[CMake] Generator for NetBeans 6.9

2010-05-31 Thread Sebastian Meier
Update.

My allocated time slot for looking into a NetBeans generator has finished. My 
impression is that patching CMake to suit our company's needs would be fairly 
easy. I have actually gotten quite far with that. 

But OTOH this easy way would be merely a hack that would benefit no one but us. 
I will recommend a more general approach that would be of use to other people 
as well and hope I'll get some more time for that.



P.S.: I have still not entirely grasped how to properly respond to e-mails on 
this mailing list so that they appear in the right place. Please excuse me for 
this. I guess I'm more used to forums etc. 
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
___
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

Re: [CMake] Generator for NetBeans 6.9

2010-05-31 Thread Eric Noulard
2010/5/31 Sebastian Meier :
> Update.
>
> My allocated time slot for looking into a NetBeans generator has finished. My 
> impression is that patching CMake to suit our company's needs would be fairly 
> easy. I have actually gotten quite far with that.
>
> But OTOH this easy way would be merely a hack that would benefit no one but 
> us. I will recommend a more general approach that would be of use to other 
> people as well and hope I'll get some more time for that.

May be you can share the hack as a patch on the bug tracker.
May be it's unusable as-is but it may already contain valuable
information for anyone wanting
to tale over?

> P.S.: I have still not entirely grasped how to properly respond to e-mails on 
> this mailing list so that they appear in the right place. Please excuse me 
> for this. I guess I'm more used to forums etc.

Reply-to-all then strip eventual list of individuals which gets cc
along the ML thread.
-- 
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


Re: [CMake] Anybody using IAR compiler here ?

2010-05-31 Thread Jesper Eskilson

On 05/30/2010 02:13 PM, Alexander Neundorf wrote:


That's also ok.
Could you please post the output of the IAR AVR and ARM assemblers when called
without any arguments here ?
(or put them into http://public.kitware.com/Bug/view.php?id=10176 )


The first non-empty line is for ARM and Atmel AVR, respectively:

IAR Assembler V5.41.2.51793/W32 for ARM
IAR Assembler V5.50.0.50277/W32 for Atmel AVR

--
Jesper Eskilson
Developer
IAR Systems
http://www.iar.com

___
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


Re: [CMake] Generator for NetBeans 6.9

2010-05-31 Thread Eric Noulard
2010/5/31 Sebastian Meier :
> Hi Bill,
>
>> Can NetBeans be driven from the command line?  That is a requirement for
>> getting try_compile to work.
>
> No, I don't think it is possible call NetBeans via command line in order to 
> build targets. But since NetBeans relies on external tool chains like gcc, 
> MinGW  or CygWin, is this really necessary?

CMake includes TRY_COMPILE feature for which will create an
appropriate CMake project
in order to try compile...
Thus CMake will use CMAKE_BUILD_TOOL in order to try to build, since
you said you won't
go for "Makefile-based" generator there should be a way to "build"
with NetBeans.

More informations:
cmake --help-variable CMAKE_BUILD_TOOL
cmake --help-variable CMAKE_GENERATOR
cmake --help-variable CMAKE_EXTRA_GENERATOR

-- 
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


[CMake] Specifying separate paths for .lib and .dll files on Windows

2010-05-31 Thread Prashanth Udupa
Hi,

I have a library project that I am generating the build system for
using CMake. I would like to have the .lib file generated in one
directory and the .dll file in another directory. Right now I am using
a construct as follows

SET(LIBRARY_OUTPUT_PATH
${PROJECT_SOURCE_DIR}/bin CACHE
PATH "Single output directory for building all libraries." FORCE)

While .dll files show up in PROJECT_SOURCE/bin, .lib files show up
within PROJECT_SOURCE/bin/Debug or Release directory. How can I set
the path of the .lib file to PROJECT_SOURCE/lib?

Can someone please throw a few hints for me please?

Thanks and Warm Regards,
Prashanth N Udupa
___
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


Re: [CMake] Specifying separate paths for .lib and .dll files on Windows

2010-05-31 Thread Prashanth Udupa
Sorry, I think I sent this question too soon...

The following constructs did the trick for me..

SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_SOURCE_DIR}/lib CACHE
PATH "Directory where all the .lib files are dumped." FORCE)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY
${PROJECT_SOURCE_DIR}/bin CACHE
PATH "Directory where .exe and .dll files are dumped." FORCE)

Thanks,
Prashanth

On Mon, May 31, 2010 at 4:44 PM, Prashanth Udupa
 wrote:
> Hi,
>
> I have a library project that I am generating the build system for
> using CMake. I would like to have the .lib file generated in one
> directory and the .dll file in another directory. Right now I am using
> a construct as follows
>
> SET(LIBRARY_OUTPUT_PATH
>    ${PROJECT_SOURCE_DIR}/bin CACHE
>    PATH "Single output directory for building all libraries." FORCE)
>
> While .dll files show up in PROJECT_SOURCE/bin, .lib files show up
> within PROJECT_SOURCE/bin/Debug or Release directory. How can I set
> the path of the .lib file to PROJECT_SOURCE/lib?
>
> Can someone please throw a few hints for me please?
>
> Thanks and Warm Regards,
> Prashanth N Udupa
>
___
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

[CMake] Fortran 90 module output directories, dependency analysis

2010-05-31 Thread Jed Brown
Is there a way to specify where generated *.mod files will be placed?
Something analogous to CMAKE_LIBRARY_OUTPUT_DIRECTORY?

Also, I notice that if I delete a module file, the build fails (unlike
everything else where it will be properly regenerated).  This is with a
plain Makefile build, cmake-2.8.1, after a successful complete build:

$ rm petscmat.mod
$ make VERBOSE=1
/usr/bin/cmake -H/home/jed/petsc -B/home/jed/petsc/ompi-complex-int64 
--check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start 
/home/jed/petsc/ompi-complex-int64/CMakeFiles 
/home/jed/petsc/ompi-complex-int64/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/jed/petsc/ompi-complex-int64'
make -f CMakeFiles/petsc.dir/build.make CMakeFiles/petsc.dir/depend
make[2]: Entering directory `/home/jed/petsc/ompi-complex-int64'
cd /home/jed/petsc/ompi-complex-int64 && /usr/bin/cmake -E cmake_depends "Unix 
Makefiles" /home/jed/petsc /home/jed/petsc /home/jed/petsc/ompi-complex-int64 
/home/jed/petsc/ompi-complex-int64 
/home/jed/petsc/ompi-complex-int64/CMakeFiles/petsc.dir/DependInfo.cmake 
--color=
make[2]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
make -f CMakeFiles/petsc.dir/build.make CMakeFiles/petsc.dir/requires
make[2]: Entering directory `/home/jed/petsc/ompi-complex-int64'
make -f CMakeFiles/petsc.dir/build.make 
CMakeFiles/petsc.dir/src/sys/f90-mod/petscmod.F.o.provides.build
make[3]: Entering directory `/home/jed/petsc/ompi-complex-int64'
/usr/bin/cmake -E cmake_copy_f90_mod petscsys 
CMakeFiles/petsc.dir/petscsys.mod.stamp GNU
/usr/bin/cmake -E cmake_copy_f90_mod petscsysdef 
CMakeFiles/petsc.dir/petscsysdef.mod.stamp GNU
/usr/bin/cmake -E touch 
CMakeFiles/petsc.dir/src/sys/f90-mod/petscmod.F.o.provides.build
make[3]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
make -f CMakeFiles/petsc.dir/build.make 
CMakeFiles/petsc.dir/src/vec/f90-mod/petscvecmod.F.o.provides.build
make[3]: Entering directory `/home/jed/petsc/ompi-complex-int64'
/usr/bin/cmake -E cmake_copy_f90_mod petscis 
CMakeFiles/petsc.dir/petscis.mod.stamp GNU
/usr/bin/cmake -E cmake_copy_f90_mod petscisdef 
CMakeFiles/petsc.dir/petscisdef.mod.stamp GNU
/usr/bin/cmake -E cmake_copy_f90_mod petscvec 
CMakeFiles/petsc.dir/petscvec.mod.stamp GNU
/usr/bin/cmake -E cmake_copy_f90_mod petscvecdef 
CMakeFiles/petsc.dir/petscvecdef.mod.stamp GNU
/usr/bin/cmake -E touch 
CMakeFiles/petsc.dir/src/vec/f90-mod/petscvecmod.F.o.provides.build
make[3]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
make -f CMakeFiles/petsc.dir/build.make 
CMakeFiles/petsc.dir/src/mat/f90-mod/petscmatmod.F.o.provides.build
make[3]: Entering directory `/home/jed/petsc/ompi-complex-int64'
/usr/bin/cmake -E cmake_copy_f90_mod petscmat 
CMakeFiles/petsc.dir/petscmat.mod.stamp GNU
Error copying Fortran module "petscmat".  Tried "PETSCMAT.mod" and 
"petscmat.mod".
make[3]: *** 
[CMakeFiles/petsc.dir/src/mat/f90-mod/petscmatmod.F.o.provides.build] Error 1
make[3]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
make[2]: *** [CMakeFiles/petsc.dir/src/mat/f90-mod/petscmatmod.F.o.provides] 
Error 2
make[2]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
make[1]: *** [CMakeFiles/petsc.dir/all] Error 2
make[1]: Leaving directory `/home/jed/petsc/ompi-complex-int64'
make: *** [all] Error 2


Jed
___
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


Re: [CMake] Cross-compilation vs FindQt4.cmake

2010-05-31 Thread Andrey .
>> I would like to know whether there is some progress on making FindQt4.cmake
>> friends with cross-compilation.
> Not much, unfortunately.
Not a piece of good news.

>> Writing to you, as you seems to be a maintainer of FindQt4.cmake in both
>> Cmake and KDE repositories.
> Well, Clinton Stimpson is the maintainer of FindQt4.cmake in CMake, and I 
> mostly merge the fixes there to the version in KDE.
> So actually he's the maintainer, but I'm also not the completely wrong person 
> here :-)
Sorry, I misunderstood the commit history a little.

>> Also, I'm interested to know, why FindQt4.cmake doesn't utilize pkg-config
>> for most introspection of Qt. Qt4 provides nice .pc files.
>> pkg-config has some built-in support for cross-compilation through
>> PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR while qmake doesn't. Simply
>> compiling qmake to be used during cross-compilation and compiling qmake to
>> return correct include/library paths are two different tasks. In first
>> case, qmake can be used for multiple cross-compilation environments.
> In general, CMake tries not to rely on any additional external tools, and 
> pkg-config is one of those tools.
Instead of blindly relying on pkg-config, it may be used as a hint in some 
complex situations like cross-compiling.
And anyway, in case of Qt, CMake relies on an external qmake, which is not 
itself required to be present at compile time (in contrast to moc/uic).

> I have (until now) never cross compiled anything with Qt.
> How does a typical Qt installation for cross compiling look like ?
> I guess it has native tools (qmake, moc, uic), etc.
I think, the installation heavily differs depending on cross-compilation 
environment used (buildroot, scratchbox, etc).
Currently, I'm using some hand-written environment, mostly resembling buildroot.
It consists of:
1) host system with general native libraries and utilities;
2) cross-compiled libraries and executables for target system placed at some 
prefix;
3) special tools, required for cross-compilation and related stuff 
(cross-toolchain, qmake, image/firmware generators go here).

Tools at item 3) usually must match specific requirements on version used.
In case of Qt, I have statically compiled qmake, moc, uic, lrelease, etc 
against exactly the same version of Qt used for target system.

> When FindQt4.cmake is executed, it queries qmake for information. 
> Does this also work for a cross-compilation installation of Qt ?
> What are the results of a FindQt4.cmake with a cross-compiling qmake ?
If no special care is taken, FindQt4 finds qmake from host system that returns 
information about host library ignoring CMAKE_FIND_ROOT_PATH (and that's wrong).
If PATH variable is modified appropriately, FindQt4 finds specially compiled 
qmake with good version.
It's possible to compile qmake to return information, suitable for 
cross-compilation.
But it's then required to recompile qmake if a change prefix somewhere.

>> Currently, I'm going to use simple FindQt4.cmake with some hardcoded paths,
>> that will override system wide one.
It's worth mentioning, that I managed to successfully compile a qt4-based 
application with such a hacked FindQt4.cmake with bunch of set() statements and 
a couple of include() directives.

> CC'ing the cmake -list.
OK.

-- 
Andrey Hippo.
___
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


[CMake] CTest / UTF-8

2010-05-31 Thread Mathieu Malaterre
Hi there,

  Does anyone know how I can tell ctest to use UTF-8 to generate the
XML files used for uploading results to CDAsh ?

I have on one hand:

Testing/Temporary/LastBuild_20100531-0918.log:/home/mathieu/Projects/CoSMo/trunk/Code/IO/csmModelModificationsLoader.cxx:386:
warning: conversion to ‘Csm::IdentityType’ from ‘int’ may change the
sign of the result

but:

Testing/20100531-0918/Build.xml:
/.../trunk/Code/IO/csmModelModificationsLoader.cxx:386:
warning: conversion to
‘Csm::IdentityType’ from
‘int’ may change the sign of the
result

knowing that:


$ head -1 Testing/20100531-0918/Build.xml


and

$ echo $LANG
en_US.UTF-8


Thanks !
-- 
Mathieu
___
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


[CMake] Targets where the command decides if the target needs rebuilding

2010-05-31 Thread David Gobbi
Hi all,

There are times when a CMake custom command will generate exactly the
same output file even if its inputs have changed.  In these cases, I
would like the timestamp on the output file to remain unchanged, but
to generate a fake ".target" file with the current timestamp so the
custom command will not be re-execute the next time I run CMake.

Here is an example:

I've written a tool called vtkBuildHeirarchy that goes through the VTK
header files and writes a text file that describes the class
hierarchy.  Then, I have some special wrappers that use this text file
to do compile-time type introspection.

A naive approach would force a complete re-build of the wrappers if
even a single header file has changed.  However, the only important
changes to the wrapper are those that change the actual hierarchy.

So, I have made my vtkBuildHeirarchy executable so that it pre-reads
the output and then only overwrites it if the hierarchy has changed.
This keeps my wrappers from re-compiling when they don't have to.
However, now the vtkBuildHeirarchy executable runs every time
(actually several times) when I run cmake because its output file's
timestamp is not updated.

This is why I want to create a second, "fake" output file with a
.target extension, so that vtkBuildHeirarchy won't execute if this
"target" file is more recent than its inputs.  However, commands that
depend on vtkBuildHeirachy's output will have to continue to check the
timestamp of the "real" output file.

Is there a way of splitting a target into a real target/fake target in cmake?

   David
___
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


Re: [CMake] Generator for NetBeans 6.9

2010-05-31 Thread Sebastian Meier
> May be you can share the hack as a patch on the bug tracker.
> May be it's unusable as-is but it may already contain valuable
> information for anyone wanting
> to tale over?

I have taken Michael Wild's advice and created a repository at github. I have 
created a topic branch (branched off "master") and pushed that topic branch 
onto the server.

http://github.com/sebastianmeier/CMake/commit/0a43c4aeb7efe570ca2f5486f5582ac847ba3fa2

Further details can be found at the respective bug tracker entry:

http://www.cmake.org/Bug/view.php?id=7632

Any comments on what steps would have to be taken to move this code to a 
working "global-/local generator"-combination would be appreciated.

P.S.: This is the first time I've used git / github so I might have screwed up 
somewhere along the way.
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
___
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

Re: [CMake] Cross-compilation vs FindQt4.cmake

2010-05-31 Thread Clinton Stimpson

On 05/31/2010 06:29 AM, Andrey. wrote:

I would like to know whether there is some progress on making FindQt4.cmake
friends with cross-compilation.
   

Not much, unfortunately.
 

Not a piece of good news.
   


There actually has been a slow replacing of things that prevent 
cross-compiling the last few cmake releases.  It could probably go a bit 
quicker, but I wanted to be careful to not break things.


Clint

___
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


Re: [CMake] CTest / UTF-8

2010-05-31 Thread Mathieu Malaterre
$ ctest --version
ctest version 2.8.0

I guess I need to update :)

Thanks

On Mon, May 31, 2010 at 7:23 PM, David Cole  wrote:
> ctest 2.8.1 and later should already be generating proper UTF-8... what
> version of ctest are you using?
>
> On Mon, May 31, 2010 at 9:32 AM, Mathieu Malaterre
>  wrote:
>>
>> Hi there,
>>
>>  Does anyone know how I can tell ctest to use UTF-8 to generate the
>> XML files used for uploading results to CDAsh ?
>>
>> I have on one hand:
>>
>>
>> Testing/Temporary/LastBuild_20100531-0918.log:/home/mathieu/Projects/CoSMo/trunk/Code/IO/csmModelModificationsLoader.cxx:386:
>> warning: conversion to ‘Csm::IdentityType’ from ‘int’ may change the
>> sign of the result
>>
>> but:
>>
>> Testing/20100531-0918/Build.xml:
>>  /.../trunk/Code/IO/csmModelModificationsLoader.cxx:386:
>> warning: conversion to
>> ‘Csm::IdentityType’ from
>> ‘int’ may change the sign of the
>> result
>>
>> knowing that:
>>
>>
>> $ head -1 Testing/20100531-0918/Build.xml
>> 
>>
>> and
>>
>> $ echo $LANG
>> en_US.UTF-8
>>
>>
>> Thanks !
>> --
>> Mathieu
>> ___
>> 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
>
>



-- 
Mathieu
___
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


Re: [CMake] CTest / UTF-8

2010-05-31 Thread David Cole
ctest 2.8.1 and later should already be generating proper UTF-8... what
version of ctest are you using?


On Mon, May 31, 2010 at 9:32 AM, Mathieu Malaterre <
mathieu.malate...@gmail.com> wrote:

> Hi there,
>
>  Does anyone know how I can tell ctest to use UTF-8 to generate the
> XML files used for uploading results to CDAsh ?
>
> I have on one hand:
>
>
> Testing/Temporary/LastBuild_20100531-0918.log:/home/mathieu/Projects/CoSMo/trunk/Code/IO/csmModelModificationsLoader.cxx:386:
> warning: conversion to ‘Csm::IdentityType’ from ‘int’ may change the
> sign of the result
>
> but:
>
> Testing/20100531-0918/Build.xml:
>  /.../trunk/Code/IO/csmModelModificationsLoader.cxx:386:
> warning: conversion to
> ‘Csm::IdentityType’ from
> ‘int’ may change the sign of the
> result
>
> knowing that:
>
>
> $ head -1 Testing/20100531-0918/Build.xml
> 
>
> and
>
> $ echo $LANG
> en_US.UTF-8
>
>
> Thanks !
> --
> Mathieu
> ___
> 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
>
___
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

Re: [CMake] multi-tiered config file inclusion

2010-05-31 Thread Michael Hertling
On 05/30/2010 11:58 PM, Hugh Sorby wrote:
> 
> So this is what I put into my OpenCASCADE config file
> 
> SET( CONFIG_FILE_CONTENTS
> "\nGET_FILENAME_COMPONENT( SELF_DIR \"\${CMAKE_CURRENT_LIST_FILE}\" 
> PATH )"
> "\nINCLUDE( \${SELF_DIR}/OpenCASCADE-targets.cmake )"
> "\nGET_FILENAME_COMPONENT( OPENCASCADE_INCLUDE_DIRS 
> \"\${SELF_DIR}/../../include/OpenCASCADE\" ABSOLUTE )"
> "\nSET( OPENCASCADE_LIBRARIES ${OCC_ToolKits_SPACED} )"
> "\nSET( OPENCASCADE_FOUND TRUE )"
> "\n" )
> 
> and I put this into my wxWidgets config file
> 
> SET( CONFIG_FILE_CONTENTS
> "\nGET_FILENAME_COMPONENT( SELF_DIR \"\${CMAKE_CURRENT_LIST_FILE}\" 
> PATH )"
> "\nINCLUDE( \${SELF_DIR}/wxWidgets-targets.cmake )"
> "\nGET_FILENAME_COMPONENT( wxWidgets_INCLUDE_DIRS 
> \"\${SELF_DIR}/../../include\" ABSOLUTE )"
> "\nSET( wxWidgets_LIBRARIES wxexpat ${wxaui_TARGET} ${wxxrc_TARGET} 
> ${wxadv_TARGET} ${wxhtml_TARGET} ${wxgl_TARGET} ${wxxml_TARGET} 
> ${wxbase_TARGET} ${wxcore_TARGET} ${WXWIDGETS_PLATFORM_DEPENDENT_LIBS} )"
> "\nGET_FILENAME_COMPONENT( wxWidgets_wxrc_EXECUTABLE 
> \"\${SELF_DIR}/../../bin/wxrc${CMAKE_EXECUTABLE_SUFFIX}\" ABSOLUTE )"
> "\nSET( wxWidgets_DEFINITIONS ${COMPILE_DEFS_SPACED} )"
> "\nSET( wxWidgets_DEFINITIONS_DEBUG ${COMPILE_DEFS_SPACED_DEBUG} )"
> "\nSET( wxWidgets_FOUND TRUE )"
> "\n" )
> 
> and my project has ths config file
> 
> SET( CONFIG_FILE_CONTENTS
> "\nGET_FILENAME_COMPONENT( SELF_DIR 
> \"\${CMAKE_CURRENT_LIST_FILE}\" PATH )"
> "\nINCLUDE( \${SELF_DIR}/${CMGUI_LIB_GROUP}-targets.cmake )"
> "\nGET_FILENAME_COMPONENT( CMGUI_INCLUDE_DIRS 
> \"\${SELF_DIR}/../../include/cmgui\" ABSOLUTE )"
> "\nSET( CMGUI_LIBRARIES ${TARGET_CMGUI_LIB} 
> ${TARGET_CMGUI_GENERAL_LIB} ${TARGET_CMGUI_CORE_FIELDS_LIB} 
> ${TARGET_CMGUI_PASS_THROUGH_LIB} )"
> "\nSET( CMGUI_FOUND TRUE )"
> "\n\n" )
> 
> After thinking about this over the weekend I am thinking I might have to 
> add some conditional INCLUDEs in to drag in the imported libraries from 
> OpenCASCADE, wxWidgets .e.t.c.. I am not sure about this approach 
> because it releies on libraries being stationary,  as an alternative I 
> thought I could add a FIND_PACKAGE with a HINTS to find the config 
> file.  It seems to me like I am just implementing a libtool archive file 
> in CMake, not my intention but I can see the attraction in it.

Perhaps, the following mylib-config.cmake is a suitable alternative -
rudimentary and not accounting for OpenCASCADE/wxWidget's specifics:

INCLUDE(/share/mylib/mylib-targets.cmake)
# Now, imported target "mylib" and its location(s) are known.
SET(MYLIB_LIBRARIES "mylib")
SET(MYLIB_DEFINITIONS )
SET(MYLIB_INCLUDE_DIRS "/.../include")
FIND_PACKAGE(OpenCASCADE PATHS ... NO_DEFAULT_PATH)
IF(OpenCASCADE_FOUND)
LIST(APPEND MYLIB_LIBRARIES ${OpenCASCADE_LIBRARIES})
LIST(APPEND MYLIB_DEFINITIONS ${OpenCASCADE_DEFINITIONS})
LIST(APPEND MYLIB_INCLUDE_DIRS ${OpenCASCADE_INCLUDE_DIRS})
ENDIF()
FIND_PACKAGE(wxWidgets COMPONENTS ... PATHS ... NO_DEFAULT_PATH)
IF(wxWidgets_FOUND)
LIST(APPEND MYLIB_LIBRARIES ${wxWidgets_LIBRARIES})
LIST(APPEND MYLIB_DEFINITIONS ${wxWidgets_DEFINITIONS})
LIST(APPEND MYLIB_INCLUDE_DIRS ${wxWidgets_INCLUDE_DIRS})
ENDIF()
# Now, MYLIB_{LIBRARIES,DEFINITIONS,INCLUDE_DIRS}, i.e. the officially
# recommended variables, are set up and ready to be used by a project.

The imported targets along with their locations are defined as usual
in mylib-targets.cmake which will be generated and installed with

INSTALL(TARGETS mylib EXPORT mylib-targets DESTINATION ...)
INSTALL(EXPORT mylib-targets DESTINATION share/mylib ...)

in your project's CMakeLists.txt.

If your opencascade-config.cmake and wxwidgets-config.cmake behave in
the same way, a project's CMakeLists.txt could use FIND_PACKAGE(mylib)
and, thereafter, MYLIB_{LIBRARIES,DEFINITIONS,INCLUDE_DIRS} to enable
the settings of mylib *and* its prerequisites OpenCASCADE/wxWidgets:

FIND_PACKAGE(mylib)
INCLUDE_DIRECTORIES(${MYLIB_INCLUDE_DIRS})
ADD_DEFINITIONS(${MYLIB_DEFINITIONS})
[...]
TARGET_LINK_LIBRARIES(... ${MYLIB_LIBRARIES})

Would that approach work for you?

Regards,

Michael
___
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


Re: [CMake] Targets where the command decides if the target needs rebuilding

2010-05-31 Thread David Gobbi
Never mind, I found an easy solution.

I just added my fake ".target" file as a second output of the command,
and use "cmake -E touch" to update the .target timestamp whenever my
custom command executes.  Even though the timestamp of my "true"
output isn't being updated, CMake doesn't re-execute the command.

   David


On Mon, May 31, 2010 at 10:13 AM, David Gobbi  wrote:
> Hi all,
>
> There are times when a CMake custom command will generate exactly the
> same output file even if its inputs have changed.  In these cases, I
> would like the timestamp on the output file to remain unchanged, but
> to generate a fake ".target" file with the current timestamp so the
> custom command will not be re-execute the next time I run CMake.
>
> Here is an example:
>
> I've written a tool called vtkBuildHeirarchy that goes through the VTK
> header files and writes a text file that describes the class
> hierarchy.  Then, I have some special wrappers that use this text file
> to do compile-time type introspection.
>
> A naive approach would force a complete re-build of the wrappers if
> even a single header file has changed.  However, the only important
> changes to the wrapper are those that change the actual hierarchy.
>
> So, I have made my vtkBuildHeirarchy executable so that it pre-reads
> the output and then only overwrites it if the hierarchy has changed.
> This keeps my wrappers from re-compiling when they don't have to.
> However, now the vtkBuildHeirarchy executable runs every time
> (actually several times) when I run cmake because its output file's
> timestamp is not updated.
>
> This is why I want to create a second, "fake" output file with a
> .target extension, so that vtkBuildHeirarchy won't execute if this
> "target" file is more recent than its inputs.  However, commands that
> depend on vtkBuildHeirachy's output will have to continue to check the
> timestamp of the "real" output file.
>
> Is there a way of splitting a target into a real target/fake target in cmake?
>
>   David
>
___
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


Re: [CMake] Cross-compilation vs FindQt4.cmake

2010-05-31 Thread Alexander Neundorf
On Monday 31 May 2010, Andrey. wrote:
> >> I would like to know whether there is some progress on making
> >> FindQt4.cmake friends with cross-compilation.
> >
> > Not much, unfortunately.
>
> Not a piece of good news.
>
> >> Writing to you, as you seems to be a maintainer of FindQt4.cmake in both
> >> Cmake and KDE repositories.
> >
> > Well, Clinton Stimpson is the maintainer of FindQt4.cmake in CMake, and I
> > mostly merge the fixes there to the version in KDE.
> > So actually he's the maintainer, but I'm also not the completely wrong
> > person here :-)
>
> Sorry, I misunderstood the commit history a little.
>
> >> Also, I'm interested to know, why FindQt4.cmake doesn't utilize
> >> pkg-config for most introspection of Qt. Qt4 provides nice .pc files.
> >> pkg-config has some built-in support for cross-compilation through
> >> PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR while qmake doesn't. Simply
> >> compiling qmake to be used during cross-compilation and compiling qmake
> >> to return correct include/library paths are two different tasks. In
> >> first case, qmake can be used for multiple cross-compilation
> >> environments.
> >
> > In general, CMake tries not to rely on any additional external tools, and
> > pkg-config is one of those tools.
>
> Instead of blindly relying on pkg-config, it may be used as a hint in some
> complex situations like cross-compiling. And anyway, in case of Qt, CMake
> relies on an external qmake, which is not itself required to be present at
> compile time (in contrast to moc/uic).
>
> > I have (until now) never cross compiled anything with Qt.
> > How does a typical Qt installation for cross compiling look like ?
> > I guess it has native tools (qmake, moc, uic), etc.
>
> I think, the installation heavily differs depending on cross-compilation
> environment used (buildroot, scratchbox, etc). 

If I remember correctly, scratchbox means running a virtual machine, so from 
this POV building inside scratchbox is not cross compiling, and in that 
regard it shouldn't need anything special from cmake.

Buildroot doesn't do that, right ?

> Currently, I'm using some
> hand-written environment, mostly resembling buildroot. It consists of:
> 1) host system with general native libraries and utilities;
> 2) cross-compiled libraries and executables for target system placed at
> some prefix; 3) special tools, required for cross-compilation and related
> stuff (cross-toolchain, qmake, image/firmware generators go here).
>
> Tools at item 3) usually must match specific requirements on version used.
> In case of Qt, I have statically compiled qmake, moc, uic, lrelease, etc
> against exactly the same version of Qt used for target system.

So this seems to be the actual crosscompiling case.
If you want to use a specific version of Qt, you have to make sure cmake finds 
the qmake for the Qt you want to use.
This can be done by
- setting CMAKE_PREFIX_PATH so that it points to the base directory where that 
qmake is installed
- setting QT_QMAKE_EXECUTABLE directly when running cmake:
cmake -DQT_QMAKE_EXECUTABLE=/your/qmake

How far do you get with this ?


> > When FindQt4.cmake is executed, it queries qmake for information.
> > Does this also work for a cross-compilation installation of Qt ?
> > What are the results of a FindQt4.cmake with a cross-compiling qmake ?
>
> If no special care is taken, FindQt4 finds qmake from host system that
> returns information about host library ignoring CMAKE_FIND_ROOT_PATH (and
> that's wrong). If PATH variable is modified appropriately, FindQt4 finds
> specially compiled qmake with good version. It's possible to compile qmake
> to return information, suitable for cross-compilation. But it's then
> required to recompile qmake if a change prefix somewhere.
>
> >> Currently, I'm going to use simple FindQt4.cmake with some hardcoded
> >> paths, that will override system wide one.
>
> It's worth mentioning, that I managed to successfully compile a qt4-based
> application with such a hacked FindQt4.cmake with bunch of set() statements
> and a couple of include() directives.

Yes, what makes FindQt4.cmake big is all the flexibility to find everything 
for the different versions on the different OSs. It started small...

Alex
___
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


Re: [CMake] Anybody using IAR compiler here ?

2010-05-31 Thread Alexander Neundorf
On Monday 31 May 2010, Jesper Eskilson wrote:
> On 05/30/2010 02:13 PM, Alexander Neundorf wrote:
> > That's also ok.
> > Could you please post the output of the IAR AVR and ARM assemblers when
> > called without any arguments here ?
> > (or put them into http://public.kitware.com/Bug/view.php?id=10176 )
>
> The first non-empty line is for ARM and Atmel AVR, respectively:
>
>  IAR Assembler V5.41.2.51793/W32 for ARM
>  IAR Assembler V5.50.0.50277/W32 for Atmel AVR

Thanks :-)

While we are at it, do the C and C++ compilers behave the same way, i.e. print 
the version information when called without arguments ?
How does that output look like then ?
Does it differ between the AVR and ARM compilers ? They seemed to be quite 
different in their command lines etc.

Alex

___
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