[CMake] using cmake with java

2006-04-06 Thread Gaetan Lehmann


Hi,

Currently, I'm using the ADD_CUSTOM_TARGET() macro to compile the java  
tests in WrapITK. The problem is that those files are rebuild for each  
make.

Is there a better way to build java programs ?

Thanks,

Gaetan


--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] force c++

2006-04-06 Thread Axel Roebel

 Axel Roebel wrote:

does anybody know how I may force the use of a c++ compiler
for source files with .c extension?


 I think we worked around taht problem:
 If one file has cpp suffix all files are compiled as C++ instead of C.
 Thsu we added a dummy file per library.

 Please correct me if I'm wrong.

Hi Jan,

sorry to say that, but you are wrong! If one file  is c++
the linker will be used in c++ mode. But for compilation
all the c files are compiled using the c compiler.

My current workaround is  :

in the sub directory I set
SET(CMAKE_C_COMPILER ${CMAKE_CXX_COMPILER})

which will replace the c compiler by the c++ compiler
for the sub directory only , and

SET_TARGET_PROPERTIES(f0main${DEBUGEXT} PROPERTIES LINKER_LANGUAGE CXX)

which will force to use c++ linker (what you achieved adding a fake c++
file). I am happy with that solution, however, I don't know whether it
would work for other things than the  Unix Makefile Generator.
And I don't know whether the LINKER_LANGUAGE property
is official part of the API, because I found that in
the cmake sources and not in any documentation


Thanks

 Jan.

 --

   Dipl.-Ing. Jan Woetzel
 --
   University of Kiel
   Institute of Computer Science and Applied Mathematics
   Hermann-Rodewald-Str. 3 [room 310]
   24098 Kiel/Germany
 --
   Phone +49-431-880-4477
   Fax   +49-431-880-4054
   Mob.  +49-179-2937346
 --
   Url   www.mip.informatik.uni-kiel.de/~jw
   Email [EMAIL PROTECTED]

 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake




--
Axel Roebel
IRCAM Analysis/Synthesis Team
Email: [EMAIL PROTECTED] | Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] What's the latest CMake Release

2006-04-06 Thread William A. Hoffman
At 09:36 AM 4/6/2006, Xavier Delannoy wrote:
Hi all, 

on Freshport.org: 
cmake 2.3.4_1 / devel
A cross-platform make
Maintained by: [EMAIL PROTECTED]

on cmake.org: 
cmake 2.2.p3

which release is the official release ? ?

2.2.3 is the offical release 2.3.4 is the KDE only release, and
is just a snap shot of CVS from about a week ago.


-Bill

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] force c++

2006-04-06 Thread Brad King

Axel Roebel wrote:

does anybody know how I may force the use of a c++ compiler
for source files with .c extension?

Before I start renaming nearly 100 files and loose all
the cvs history I would prefer a solution where cmake would
allow me to select a compiler for the part of the files
that require c++ compilation.


FYI, it is possible to rename files in CVS without losing history, but 
you have to be careful.  Here is how:


1.) Disable write access by all users but yourself.
2.) Create a backup copy of the repository.
3.) On the CVS server COPY each ,v file to the new name:
  cp foo.c,v foo.cxx,v
4.) Do a cvs update on one checkout with your user.
  cvs up
5.) cvs remove all the original names and commit.
  cvs rm foo.c
  cvs commit -m Removing foo.c, the old name for foo.cxx
6.) Remove all sticky tags from the new names.
  cvs tag -d old-tag foo.cxx
7.) Remove all branch tags from the new names.
8.) Restore write access for other users.

I've forgotten off the top of my head if deleting tags works for 
branches.  To do step #7 you may need to do cvs update -r old-branch 
to each branch (which should restore the old names too) and then cvs 
remove the new names.


-Brad
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] communicat variables from sub directories

2006-04-06 Thread James Bigler

Brad King wrote:

Axel Roebel wrote:


Hello,

I am trying to collect source file lists from sub directories
into the main cmake cache.

The idea is that the main directory gets a collection of all source 
files and header files such that it may run a doxygen whenever one of 
these files has changed.


Imagine

SET(DOCFILES  CACHE INTERNAL list of all files containing doc)
ADD_SUBDIRECTORY(src )
ADD_SUBDIRECTORY(include)

and in each subdir I tried various versions like

SET(DOCFILES ${DOCFILES}${LISTOFSRCS} )

or what I considered more likely to be correct

SET(DOCFILES ${DOCFILES}${LISTOFSRCS} CACHE INTERNAL list of all 
files containing doc)



This gives me a correct list of files in the subdirectory
but the variable in the main directory is not changed.

For now I found that  I need to create a new cache variable in the
sub directories to be able to read the content of that variable in the 
main directory so that's what I do now.

Does anybody know how to make that work with a more elegant
solution ?



See bin/cmake --help-command GET_DIRECTORY_PROPERTY.

GET_DIRECTORY_PROPERTY(
  subdir_SOMEVAR DIRECTORY subdir DEFINITION SOMEVAR
)


What I've done is to use the INCLUDE() function.  This will work with older 
versions of CMake that don't have the newer GET_DIRECTORY_PROPERTY functionality.


INCLUDE(subdir/CMakeLists.txt)  or
INCLUDE(subdir/sources.cmake)

Inside these directories paths are relative to the CMakeLists.txt file that 
included it.


sources.cmake :

SET(MY_SOURCES
   subdir/Source.cc
   subdir/Source2.cc
   subdir/Source3.cc
   )

James
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] communicat variables from sub directories

2006-04-06 Thread Axel Roebel
On Thursday 06 April 2006 16:42, Brad King wrote:
 Axel Roebel wrote:
  Hello,
 
  I am trying to collect source file lists from sub directories
  into the main cmake cache.
 
  The idea is that the main directory gets a collection of all source files
  and header files such that it may run a doxygen whenever one of these
  files has changed.
 
  Imagine
 
  SET(DOCFILES  CACHE INTERNAL list of all files containing doc)
  ADD_SUBDIRECTORY(src )
  ADD_SUBDIRECTORY(include)
 
  and in each subdir I tried various versions like
 
  SET(DOCFILES ${DOCFILES}${LISTOFSRCS} )
 
  or what I considered more likely to be correct
 
  SET(DOCFILES ${DOCFILES}${LISTOFSRCS} CACHE INTERNAL list of all files
  containing doc)
 
 
  This gives me a correct list of files in the subdirectory
  but the variable in the main directory is not changed.
 
  For now I found that  I need to create a new cache variable in the
  sub directories to be able to read the content of that variable in the
  main directory so that's what I do now.
 
  Does anybody know how to make that work with a more elegant
  solution ?

 See bin/cmake --help-command GET_DIRECTORY_PROPERTY.

 GET_DIRECTORY_PROPERTY(
subdir_SOMEVAR DIRECTORY subdir DEFINITION SOMEVAR
 )

Thanks Brad,

this is really much nicer.

Axel

 -Brad
 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

-- 
Axel Roebel
IRCAM Analysis/Synthesis Team
Email: [EMAIL PROTECTED] | Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] communicat variables from sub directories

2006-04-06 Thread Axel Roebel
On Thursday 06 April 2006 18:00, James Bigler wrote:
 Brad King wrote:
  Axel Roebel wrote:
  Hello,
 
  I am trying to collect source file lists from sub directories
  into the main cmake cache.
 
  The idea is that the main directory gets a collection of all source
  files and header files such that it may run a doxygen whenever one of
  these files has changed.
 
  Imagine
 
  SET(DOCFILES  CACHE INTERNAL list of all files containing doc)
  ADD_SUBDIRECTORY(src )
  ADD_SUBDIRECTORY(include)
 
  and in each subdir I tried various versions like
 
  SET(DOCFILES ${DOCFILES}${LISTOFSRCS} )
 
  or what I considered more likely to be correct
 
  SET(DOCFILES ${DOCFILES}${LISTOFSRCS} CACHE INTERNAL list of all
  files containing doc)
 
 
  This gives me a correct list of files in the subdirectory
  but the variable in the main directory is not changed.
 
  For now I found that  I need to create a new cache variable in the
  sub directories to be able to read the content of that variable in the
  main directory so that's what I do now.
  Does anybody know how to make that work with a more elegant
  solution ?
 
  See bin/cmake --help-command GET_DIRECTORY_PROPERTY.
 
  GET_DIRECTORY_PROPERTY(
subdir_SOMEVAR DIRECTORY subdir DEFINITION SOMEVAR
  )

 What I've done is to use the INCLUDE() function.  This will work with older
 versions of CMake that don't have the newer GET_DIRECTORY_PROPERTY
 functionality.

 INCLUDE(subdir/CMakeLists.txt)  or
 INCLUDE(subdir/sources.cmake)

 Inside these directories paths are relative to the CMakeLists.txt file that
 included it.

 sources.cmake :

 SET(MY_SOURCES
 subdir/Source.cc
 subdir/Source2.cc
 subdir/Source3.cc
 )

Thanks James,

for the moment I am assuming the last version.

BTW, I always store all files with complete path, this avoids all problems 
with relative paths.

Cheers,

 James
 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

-- 
Axel Roebel
IRCAM Analysis/Synthesis Team
Email: [EMAIL PROTECTED] | Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake