Re: [CMake] Ctest + Post command

2008-11-12 Thread Alexander.Camek
Hi David,

> David Cole wrote:
> 
> What does the script that you run by cron look like?
> Is it a declarative(/old-style) ctest script or a 
> command-based(/new-style) ctest script?
> Or something else?

It is an old-styled one. Do I need something special to use the new-style?
 
> In a declarative style ctest script, you could set 
> CTEST_COMMAND to be a list of multiple commands, rather than 
> just a ctest -D call, as exemplified by this VTK build script:
> http://www.cdash.org/CDash/viewNotes.php?buildid=212772
> (In the example, the dashboard is run by a ctest -D command, 
> and then a memcheck dashboard is run after that...)

So when I have something like:
SET(CTEST_COMMAND "ctest -D Nightly" "FOO")
First the ctest will be run (here a nightly build) and after that FOO.

Greetings

Alexander 



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Ctest + Post command

2008-11-12 Thread Alexander.Camek
Hi list,

I have got here a script which is invoked by cron job. During that all will be 
checked out and compiled, tested and uploaded to Cdash server.
What I want to do now is to add a post command to my script so that I can run a 
profiling tool. Additionally I want to use in the post script also the svn 
command in order to tag my currently tested results. 

Is there any possibilty to solve that?

Thanks for your info.

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

Re: [CMake] Getting if custom target is set

2008-11-06 Thread Alexander.Camek
Hi Phillip,

Thanks for your help.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> <[EMAIL PROTECTED]> wrote:
> 
> 
>   Hi folks,
>   
>   I have got a project split up into a lot of single project.
>   So in my ROOR dir I have got a CMakeLists.txt which 
> defines a "master" PROJECT().
>   Each subdirectory added by the master project adds in 
> its CMakeLists.txt its own PROJECT() in order to build alone.
>   
>   Now I add a new command ADD_CUSTOM_TARGET(lint ) in my 
> master project in order to do a make lint.
>   This works fine if everybody uses the whole project. 
> But if he uses only a subproject as standalone this doesn't work.
>   It doesn't know the custom target. But if I add this to 
> the subprojects cmake warns me about "CMP0002".
>   
>   What I want to do is now to check if my custom target 
> was set and if not I want to set it in the subproject.
>   
>   Something like that:
>   GET_TARGET_EXISTS(LINT_SET lint)
>   
>   IF(NOT LINT_SET)
> ADD_CUSTOM_TARGET(lint )
>   ENDIF(NOT LINT_SET)
>   
>   How can I do that?
> 
> 
> I'm not completely sure what you're asking for, but the IF() 
> command does support checking for targets if that's what 
> you're looking for:
> 
> if(TARGET target-name)
> http://www.cmake.org/cmake/help/cmake2.6docs.html

That was exactly what I am looking for. So simply
Thought I had to use the correct property by get_target_property() or one other 
of that, so I did't look at the IF command.

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Getting if custom target is set

2008-11-05 Thread Alexander.Camek
Hi folks,

I have got a project split up into a lot of single project.
So in my ROOR dir I have got a CMakeLists.txt which defines a "master" 
PROJECT().
Each subdirectory added by the master project adds in its CMakeLists.txt its 
own PROJECT() in order to build alone.

Now I add a new command ADD_CUSTOM_TARGET(lint ) in my master project in order 
to do a make lint.
This works fine if everybody uses the whole project. But if he uses only a 
subproject as standalone this doesn't work.
It doesn't know the custom target. But if I add this to the subprojects cmake 
warns me about "CMP0002". 

What I want to do is now to check if my custom target was set and if not I want 
to set it in the subproject.

Something like that:
GET_TARGET_EXISTS(LINT_SET lint)

IF(NOT LINT_SET)
   ADD_CUSTOM_TARGET(lint )
ENDIF(NOT LINT_SET)

How can I do that?

Thanks for your help.

Greetings

Alex



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Bugtracker + CDash

2008-09-12 Thread Alexander.Camek
Hi folks, 

I want to use Cdash here.
So I want to know if it is possible to connect the Cdash with Mantis?
Or if it is possible to connect Cdash with any bugtracker (especially Jira).

Thanks.

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

Re: [CMake] Problem Porting from cmake 2.4.7 to 2.6

2008-06-30 Thread Alexander.Camek
Hi,

Sorry for my late response, but there wasn't any PC at my weekend location.

> Alan W. Irwin wrote:
> Thanks, Brad, for pointing me in the correct direction.  
> Checking with the
> 2.4.8 and 2.6.0 versions of the corresponding Fortran file, 
> the variables that must be added in total for 2.6.0 and Ada 
> are actually
> 
> CMAKE_SHARED_LIBRARY_RPATH_LINK_Ada_FLAG
> CMAKE_EXECUTABLE_RUNTIME_Ada_FLAG *
> CMAKE_EXECUTABLE_RUNTIME_Ada_FLAG_SEP *
> CMAKE_EXECUTABLE_RPATH_LINK_Ada_FLAG
> CMAKE_SHARED_LIBRARY_LINK_Ada_WITH_RUNTIME_PATH
> 
> * indicates ones you mentioned above.
> 
> Once those additional variables are set, shared Ada libraries 
> work for the simple test project and also for PLplot 
> regardless of whether I use
> 2.4.8 or 2.6.0!
> 
> So it really does appear there is a significant addition to 
> the number of variables you have to set for 2.6.0 language 
> support compared to 2.4.x language support.
> 
> To Bill Hoffman: I don't mind that backwards incompatible 
> change, but there might be one or two others trying to port 
> language support between 2.4.8 and 2.6.0 so perhaps this 
> change should be documented somewhere?
> 
> Thanks very much, Brad, for helping me to get these Ada 
> language support issues straightened out for 2.6.0.
> 
> To Alexander Camak (and others interested in Ada support for 
> CMake): please try the test project with the option of shared 
> libraries for CMake-2.6.0 to be sure it works on all 
> platforms of interest to you.

Thanks for all your help. I will test it here on my machine for windows.

By the way, I have written a macro for using gnatbind explicitly for some 
libraries here.

Ada has the speciality if you use direct some Ada libraries there has to be 
some _elabbs codes and also an entrypoint called adainit, for exit it is called 
adafinalize.
These are normally generated for libraries by calling gnatmake, then they are 
generated by the binder implicitly, or the programmer gives it explicitly. 

I will give it to everybody who wants or need this macro.

Greetings

Alexander Camek



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Problem Porting from cmake 2.4.7 to 2.6

2008-06-27 Thread Alexander.Camek
Hi List,

Today I started to port my Ada project (Windows, MinGW, Ada cmake files from 
plplot) from cmake 2.4.7 to cmake 2.6.
Now I have the problem that cmake doesn't want to use gnatmake anymore and says 
that gnatmake is broken.

It seems that the test for the Ada language goes wrong. When I look at the 
output file of the error I recognized a line which produces the failure.

[100%] Building Ada object
CMakeFiles/testadacompiler.dir/testadacompiler.adb.obj

C:\GNAT\bin\gcc.exe -c 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.adb -o 
CMakeFiles\testadacompiler.dir\testadacompiler.adb.obj
gnat1: incorrect object file extension

Then I started to figure out why it doesn't work by testing some command line 
calls:
Works: C:\GNAT\bin\gcc.exe -c 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.adb
Works: C:\GNAT\bin\gcc.exe -c 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.adb -o 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.o
Fails: C:\GNAT\bin\gcc.exe -c 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.adb -o 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.adb.o
Fails: C:\GNAT\bin\gcc.exe -c 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.adb -o 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.adb.obj
Fails: C:\GNAT\bin\gcc.exe -c 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.adb -o 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.obj

So I now force to set in the CmakeAdaCompiler.cmake.in:
#IF(UNIX OR MINGW)
  SET(CMAKE_Ada_OUTPUT_EXTENSION .o) # set hardcoded because gnatmake always 
wants .o files
#ELSE(UNIX OR MINGW)
#  SET(CMAKE_Ada_OUTPUT_EXTENSION .obj)
#ENDIF(UNIX OR MINGW)

This sets the correct ending now, but how can I get rid of the extra .adb in 
call of output?
When I look at the make file in the CMakeTmp directory (--debug-output 
--debug-trycompile) I noticed that there is a rule:

testadacompiler.o: testadacompiler.adb.o
$(MAKE) -f CMakeFiles\cmTryCompileExec.dir\build.make 
CMakeFiles/cmTryCompileExec.dir/testadacompiler.adb.o
.PHONY : testadacompiler.o

Then the rule in the specific one:

CMakeFiles/cmTryCompileExec.dir/testadacompiler.adb.o: testadacompiler.adb
$(CMAKE_COMMAND) -E cmake_progress_report 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\CMakeFiles $(CMAKE_PROGRESS_1)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green 
"Building Ada object CMakeFiles/cmTryCompileExec.dir/testadacompiler.adb.o"
C:\GNAT\bin\gcc.exe  $(Ada_FLAGS) -c 
C:\Projects\realisWin32\CMakeFiles\CMakeTmp\testadacompiler.adb -o 
CMakeFiles\cmTryCompileExec.dir\testadacompiler.adb.o

Where will the name of the output file be set and how do I get rid of the .adb 
in the output name?

Thanks for any hint

Greetings

Alexander Camek



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

Re: [CMake] Generating import libs

2008-06-25 Thread Alexander.Camek
Hi Christian,

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Christian Ehrlicher
> Sent: Wednesday, June 25, 2008 2:22 PM
> To: cmake@cmake.org
> Subject: Re: [CMake] Generating import libs
> 
> > Von: Alexande
> > Hi all,
> > 
> > First of all thanks for the great tool.
> > 
> > I am using here cmake in combination with GNAT (Ada) under 
> Windows and 
> > MinGW. The support of Ada for cmake was made by Alan W. 
> Irwin who made 
> > my life much easier.
> > 
> > As I wrote in an earlier mail to the list I noticed that Cmake 
> > generates during build static and dynamic libraries. Then I was 
> > corrected by others of the list because the libraries 
> interpreted as 
> > static ones were originally the import libraries for some dlls.
> > 
> > After some inspection I noticed that these import libraries are 
> > generated automtically by cmake.
> Wrong - cmake does nothing here. Your linker creates the 
> import libs as soon as it finds an exported function. We had 
> this one week ago or so already.

Maybe I don't know exactly.

I see, then it will be here the wrong list for the discussion, why the linker 
creates the import lib for exported functions for C and C++. But not for Ada.

Thanks anyway.

Greetings

Alexander Camek 



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Generating import libs

2008-06-25 Thread Alexander.Camek
Hi all,

First of all thanks for the great tool.

I am using here cmake in combination with GNAT (Ada) under Windows and MinGW. 
The support of Ada for cmake was made by Alan W. Irwin who made my life much 
easier.

As I wrote in an earlier mail to the list I noticed that Cmake generates during 
build static and dynamic libraries. Then I was corrected by others of the list 
because the libraries interpreted as static ones were originally the import 
libraries for some dlls.

After some inspection I noticed that these import libraries are generated 
automtically by cmake. But these are only generated for the dlls which are 
written in C or C++. 

My question is how can the same behaviour made for Ada, so that the import 
libraries are also generated automatically for the dlls written in Ada? 
Explicit it could be done by adding -Wl,--out-implib. But I want to avoid to 
add this for every Ada written dll, because it is compiler dependent and maybe 
some developer forgets to add this to his CMakeLists.txt.

Thanks for any hint you can give.

Best regards

Alexander Camek



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

Re: [CMake] How to read content of a registry entry on WIN32?

2008-05-07 Thread Alexander.Camek
Hi Eric,


> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Eric Noulard
> Sent: Wednesday, May 07, 2008 3:38 PM
> To: CMake ML
> Subject: [CMake] How to read content of a registry entry on WIN32?
> 
> I want to use the content of a regsitry entry
> 
> HKEY_LOCAL_MACHINE\SOFTWARE\GnuWin32/InstallPath
> 
> in order to use it in a FIND_PROGRAM , PATHS argument?
> 
> find_program(LEX_PROGRAM
>  NAMES flex lex
>  PATHS
> "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\InstallPath]/bin"
>  NO_DEFAULT_PATH
>  DOC "A lex-compatible lexer generator")
> 
> but this does not work?
> 
> How can I do that?

I just do that and it works for me.

FIND_PROGRAM(FLEX flex 
[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32;InstallPath]\\bin)

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] How to specify out-of-source build/lib/bin directories

2008-01-17 Thread Alexander.Camek
Hi Matthias,

> I'm a new cmake user and I'm having a little trouble. Perhaps 
> someone here can help me: I was wondering if it is possible 
> to specify a build path manually within the toplevel 
> CMakeLists.txt file? I did read the wiki about out-of-source 
> build environments, but the examples all used ccmake for 
> setting it up (or I missed it). The same applies to lib/bin 
> paths, i.e. I would like to specify an out-of-source lib 
> directory and an out-of-source bin directory to place the 
> executables in... what would be the appropriate command for this?


In order to get an own out-of source path to lib or bin directory you can use 
following variables:
# set destination paths
SET(LIBRARY_OUTPUT_PATH  ${_BINARY_DIR}/lib CACHE PATH "Single 
directory for all libraries." )
SET( EXECUTABLE_OUTPUT_PATH ${_BINARY_DIR}/bin CACHE PATH "Single 
directory for all executables." )
MARK_AS_ADVANCED( EXECUTABLE_OUTPUT_PATH )
MARK_AS_ADVANCED( LIBRARY_OUTPUT_PATH )

Where  is the name which was set by PROJECT()
 
Hope to help

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] Custom build command for documentation

2008-01-08 Thread Alexander.Camek
Ah forgot to put the ADD_CUSTOM_TARGET before the ADD_SUBDIRECTORY. 
Now it works fine.

Thanks Stefan for your greate help.

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] Custom build command for documentation

2008-01-08 Thread Alexander.Camek


> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> ] On Behalf Of Stefan Buschmann
> Sent: Tuesday, January 08, 2008 1:51 PM
> To: CMake@cmake.org
> Subject: Re: [CMake] Custom build command for documentation
> 
> Hi,
> 
> You can just define custom dependencies to include all your 
> documentation in one "doc" target.
> 
> E.g. I have a target "Docs" in my project:
>   ADD_CUSTOM_TARGET(Docs)
> 
> And then in each subdirectory that contains a documentation 
> project, I write e.g.:
>   ...
>   ADD_CUSTOM_TARGET(Docs-Doxygen
> DEPENDS   ${PROJECT_TARGET_CHM}
>   )
>   ...
>   ADD_DEPENDENCIES(Docs
> Docs-Doxygen
>   )

I have tried this, but I get the error that doc isn't known.
Okay it can't be known, because it is defined in the main CMakeLists.txt and 
not in the same subdirectory CMakeLists.txt.

> > currently I can generate for some subdirectories my Latex 
> and Doxygen documentation. This is done like it is described 
> in the cmake FAQ.
> > What I now want to do is to collect all this commands of 
> the subdirectory and put it in an unique common build 
> command, e.g. make doc.
> > The idea is that the user can generate all documents with 
> one common command, like cmake currently does during source 
> build when a user types make all.
> >
> > The problem is that when I add a custom target it doesn't 
> know about targets given by a ADD_SUBDIRECTORY command.
> >
> > Consider following structure:
> >
> > \src
> >  \modules
> >   \module1 -> some docu
> >   \module2 -> some docu
> >   \module3 -> some docu
> >  \tools
> >   \tool1 -> some docu
> >   \tool2 -> some docu
> >
> > Then think about the user who types in "make doc" and all 
> documents of the whole build is generated.
> >
> > Is it with current release (cmake 2.4.7) possible to 
> generate such a command for generating documentation?
> >
> > If not so. Does the next big step of cmake (cmake 2.5 or 
> 2.6 ???) consider something like a doc command in it? Similar 
> to the install command which collects all informations of the 
> to installable files. 

What I have currently tried was this:
Consider following structure:

\src (main CMakeLists.txt)
  \modules (module CMakeLists.txt)
   \module1 -> some docu (CMakeLists.txt for module1 with build and all source 
information stuff, add_library, and so on)
   \module2 -> some docu
   \module3 -> some docu
  \tools
   \tool1 -> some docu
   \tool2 -> some docu

In my CMakeLists.txt at given structure I added after the ADD_SUBDIRECTORY 
commands in the main CMakeLists.txt

ADD_CUSTOM_TARGET(LaTeX_Documents echo DEPENDS modules_doc tools_doc)
ADD_CUSTOM_TARGET(Doxygen_Documents DEPENDS )
ADD_CUSTOM_TARGET(doc DEPENDS LaTeX_Documents Doxygen_Documents)

Now I added there in the CMakeList.txt after the ADD_SUBDIRECTORY a 
ADD_CUSTOM_TARGET(modules_doc echo DEPENDS module1_doc module2_doc) and so on.
And for example in my module1 CMakeLists.txt I added 
ADD_CUSTOM_TARGET(module1_doc echo DEPENDS ${RESULT}) after the whole three 
step Latex build (as explaned on FAQ).

But that doesn't work, because I get an error: No rule to make target 
`module1_doc', needed by `modules/CMakeFiles/modules_doc'.

Is it possible do something like that. The idea behind the hierachical step is 
that every future module developer has only to add his module directory and add 
his document target to the CMakeLists.txt in the upper directory. Therefore he 
doesn't need to know or change anything in any other part of the build.

Hope now my idea is more clearer.


Greetings Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Custom build command for documentation

2008-01-08 Thread Alexander.Camek
Hi all,

currently I can generate for some subdirectories my Latex and Doxygen 
documentation. This is done like it is described in the cmake FAQ.
What I now want to do is to collect all this commands of the subdirectory and 
put it in an unique common build command, e.g. make doc.
The idea is that the user can generate all documents with one common command, 
like cmake currently does during source build when a user types make all.

The problem is that when I add a custom target it doesn't know about targets 
given by a ADD_SUBDIRECTORY command.

Consider following structure:

\src
 \modules
  \module1 -> some docu
  \module2 -> some docu
  \module3 -> some docu
 \tools
  \tool1 -> some docu
  \tool2 -> some docu

Then think about the user who types in "make doc" and all documents of the 
whole build is generated.

Is it with current release (cmake 2.4.7) possible to generate such a command 
for generating documentation?

If not so. Does the next big step of cmake (cmake 2.5 or 2.6 ???) consider 
something like a doc command in it? Similar to the install command which 
collects all informations of the to installable files. 

Thanks for your help.

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] Using Macro function like

2007-12-03 Thread Alexander.Camek
Hi,


> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> ] On Behalf Of Andreas Pakulat
> Sent: Monday, December 03, 2007 11:52 AM
> To: cmake@cmake.org
> Subject: Re: [CMake] Using Macro function like
> 
> On 03.12.07 05:47:29, Brandon Van Every wrote:
> > On Dec 3, 2007 5:41 AM,  <[EMAIL PROTECTED]> wrote:
> > >
> > > I invoke the macro by calling it with C2ADA(${LIST_OF_FILES} ADS).
> > >
> > > Is there a possibilty to do what I want by using another command?
> > 
> > You want variable arguments.  Look in the MACRO docs for 
> ARGC, ARGV, and ARGN.

Nope I want to have only two arguments. One for my list and one for the option.

> And it might be easier if you switch positions for option and 
> file-list.

So there is no other possiblity instead using ARGV?

Thought it could be easier.
Then I will parse the ARGV given list on my own.

Thanks for your help.

Greetings

Alexander




Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Using Macro function like

2007-12-03 Thread Alexander.Camek
Hi List,

is there a possibility to use a macro like a function?

I am trying to use my macro to do following. I give the macro one or more files 
and an option.
The command looks like that:

MACRO (C2ADA _file _option)

What I found out that the usage of my macro does only work if _file gets one 
file, but it fails when it gets more than one filename.
When I invoke the macro with more then on filename, then _option contains the 
second filename and not, as I would expected, the option I give it explicitly.

I invoke the macro by calling it with C2ADA(${LIST_OF_FILES} ADS).

Is there a possibilty to do what I want by using another command?
Or do I have to parse the whole arguments on my own to sperate between files 
and option in my macro?

Thanks for your ideas

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] Include_Directories

2007-11-06 Thread Alexander.Camek
Hi Alex, List,

>> is there a variable to get all paths specified by Include_Directories.
>> Because I need the path set for a third party programm to run on some 
>> source files, before the build is done. And this programm needs a 
>> subset of the paths given already in the include_directories command.
>>
>> Is there something like CMAKE_CURRENT_INCLUDE_DIR?

>GET_DIRECTORY_PROPERTY( INCLUDE_DIRECTORIES)

Works great. Now I can do that for every module in a common macro.

Thanks for your help.

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Include_Directories

2007-11-06 Thread Alexander.Camek
Hi List,

is there a variable to get all paths specified by Include_Directories.
Because I need the path set for a third party programm to run on some source 
files, before the build is done.
And this programm needs a subset of the paths given already in the 
include_directories command.

Is there something like CMAKE_CURRENT_INCLUDE_DIR?

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] can't pipe cl.exe in a custom command

2007-11-06 Thread Alexander.Camek
Hi,

> I'm trying to grab the cl.exe banner so I can determine the 
> MSVC version number.  If cl.exe is in the path, then the 
> following works at a Windows Command Prompt.  This gives a 
> short banner with the VC version number and copyright.
> 
>   cl /? 2> banner.txt
> 
> But when I try to do it in a custom command, I can't get it 
> to pipe to a file.  I see the output go by in the Visual 
> Studio output window, with 1> prefixed in front of all the 
> lines, and it is saved in BuildLog.htm, but cbanner.txt has 0 
> length no matter whether I use >
> 1> 2> as the pipe.  Does MSVC simply not have a notion of piping or
> something?  Do I have to do something MSVC-specific to 
> capture the output or the error?
> 
> IF(MSVC)
> ADD_CUSTOM_COMMAND(
>   OUTPUT ${CMAKE_BINARY_DIR}/cbanner.txt
>   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
>   COMMAND ${CMAKE_C_COMPILER} /? 2> cbanner.txt
> )
> ADD_CUSTOM_TARGET(cbanner ALL
>   DEPENDS ${CMAKE_BINARY_DIR}/cbanner.txt
> )
> ENDIF(MSVC)

Had a similar problem during generating a file with >> or with >. 
Then I used VERBATIM and it worked.

Maybe this will help here too.

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] FIND_LIBRARY & mingw

2007-10-16 Thread Alexander.Camek
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hi Christian,


> it looks like FIND_LIBRARY is using a .lib if it can't find a 
> .a/.dll.a when using the mingw generator (see also
> http://lists.kde.org/?l=kde-windows&m=119248363310566&w=2)
> 
> Is this a intented behaviour?

Normally under windows you will need to link against a .lib.
CMake default settings is to look for .lib files, so this is a intentend 
behaviour.

So look in the file Windows.cmake in your Cmake installation path, there under 
modules\plattform.
There it is set SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")

Greetings

Alexander

-BEGIN PGP SIGNATURE-
Version: CryptoEx 3.0.9.0 
Comment: CryptoEx Security Software - Desktop Platform v3

iQA/AwUBRxSG8kBUULWq6X/JEQJBbgCfYHGm2grPVMKR209cA3o3+wEjD9kAnRBi
WUv72JI/hwBALftpQAm7dzPf
=u+1Y
-END PGP SIGNATURE-



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] keep semicolons alive

2007-10-09 Thread Alexander.Camek
Hi Maik

> I want to fetch a environment variable which contains 
> semicolon by intention, modify it a little and use it with a 
> custom command:
> 
> #TEXINPUTS_latex is ":;${workspace_loc}/texmf/texmf/tex//"
> SET(TEXINPUTS "$ENV{TEXINPUTS_latex};${PROJECT_SOURCE_DIR}")
> #TEXINPUTS should be 
> ":;${workspace_loc}/texmf/texmf/tex//;/path/to/project"
> 
> ADD_CUSTOM_COMMAND(
> OUTPUT   ${PROJECT_BINARY_DIR}/${LATEX_target}.ps
> COMMAND   TEXINPUTS="${TEXINPUTS}" 
>${DVIPS_CONVERTER}   
>${DVI_FILE_WE}.dvi   -o${PS_FILE_WE}.ps
>DEPENDS${DVI_FILE_WE}.dvi
>COMMENT"dvi -> ps for PDF_${LATEX_target}" )
> 
> The problem is that the semicolons are replaced by space " ".
> 
> How can I achieve what I want?

I have got a similar problem.

But I solved it by escaping the semicolon with a backslash, e.g ; -> \;

Hope it will work for you.

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Problem with macro

2007-10-05 Thread Alexander.Camek
Hi List,

I have written a macro in order to use it as a new command in cmake.
This macro looks like this;

MACRO(C2ADA _file _option)
IF(C2ADA_PARSER)
SET(INC_DIRS -I;-I)

GET_FILENAME_COMPONENT(_name ${_file} NAME)
GET_FILENAME_COMPONENT(_basename ${_file} NAME_WE)
  SET(ADSFILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.ads)
  SET(ADBFILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.adb)
SET_SOURCE_FILES_PROPERTIES(${ADSFILE} GENERATED)
SET_SOURCE_FILES_PROPERTIES(${ADBFILE} GENERATED)

IF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${_name})
CONFIGURE_FILE(${_file} ${CMAKE_CURRENT_BINARY_DIR}/${_name} 
COPYONLY)
ENDIF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${_name})

ADD_CUSTOM_COMMAND(OUTPUT ${ADSFILE} ${ADBFILE}
   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_name}
   COMMAND ${C2ADA_PARSER} -O. -DC2ADA 
-fun -rrc -C -D_LITTLE_ENDIAN_ 
-DOS_SYSV 
-noref -erc -mwarn ${INC_DIRS} 
${_name}
COMMENT "option = ${_option}; file 
= ${_file}")

 #IF(${_option} MATCHES "ADS")
 IF(${_option} STREQUAL "ADS")
IF(WIN32)
ADD_CUSTOM_TARGET(DELETE_${_basename}_ADB ALL
  DEPENDS ${ADBFILE}
  COMMAND del ${ADBFILE})
ELSE(WIN32)
ADD_CUSTOM_TARGET(DELETE_${_basename}_ADB ALL
  DEPENDS ${ADBFILE}
  COMMAND rm -f ${ADBFILE}
  COMMENT "delete now ${ADBFILE}")
ENDIF(WIN32)
 ENDIF(${_option} STREQUAL "ADS")
#ENDIF(${_option} MATCHES "ADS")
ENDIF(C2ADA_PARSER)
ENDMACRO(C2ADA)

So the idea of this macro is to use a third party parser called c2ada. This 
uses a .h file and converts it to ada, but it creates both the specfiles .ads 
(same as .h files) and the body files .adb (same as .c or .cpp). Sometimes 
these bodies are empty, so you have to delete them from the build tree. If you 
don't do that the compile will fail.

Okay, now in my cmakelists I call the marco with 
C2ADA(${CMAKE_CURRENT_SOURCE_DIR}/foo.h ADS)
I use this macro often in my build process. But sometimes it fails!
As a example run, I get this problem:

[  0%] Built target framework
[  0%] option = ADS; file = foo.h
'import site' failed; use -v for traceback
Info: Generating ./foo.ads ./foo.adb
[  0%] delete now foo.adb
[  0%] Built target DELETE_foo_ADB
[  1%] Built target foo
[  1%] option = ADS; file = bar.h
'import site' failed; use -v for traceback
Info: Generating ./bar.ads ./bar.adb
[  1%] delete now bar.adb
[  1%] Built target DELETE_bar_ADB
[  1%] Built target bar
Scanning dependencies of target bar
[  2%] Building Ada object CMakeFiles/bar.dir/baar.o
Linking Ada shared library ../../lib/libbar.so
[  2%] Built target bar
[  2%] option = ADS; file = test.h
'import site' failed; use -v for traceback
Info: Generating ./test.ads ./test.adb
Scanning dependencies of target test
test.ads:5:09: package "test" does not allow a body
test.ads:5:09: remove incorrect body in file "test.adb"
make[2]: *** [CMakeFiles/test.dir/test.o] Error 1
make[1]: *** [CMakeFiles/test.dir/all] Error 2
make: *** [all] Error 2

Why is the macro called correct by calling it with foo and bar, but will fail 
when I call it for test?
There is no difference in all three cmakelists.txt files, expect that when I 
call the macro with test.h I use the macro once again!

Common question: Is it possible that when I use my own macro twice in a 
cmakelists.txt, then it will fail?

Thanks for your help

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Macro command

2007-09-24 Thread Alexander.Camek
Hi List,

I want to write a macro for a local used command.

Is it possibly to use CMAKE_CURRENT_BINARY_DIR in the macro?

Where does it point to? To the current binary directory of the called 
CMakeLists.txt or the binary directory where the macro is in?

Thanks for the clarification.


Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] CPack

2007-09-18 Thread Alexander.Camek
Hi,

First of all, thanks to everybody who helped me so far.
 
> CMake-2.4.7 wants either WinZip or Info-Zip[1]. Since the latter is 
> free, I use that. You get some command line programs that CMake uses 
> just fine :)

> [1]: ftp://ftp.info-zip.org/pub/infozip/WIN32/zip232xn.zip

I will test my Cpack part with Info-Zip.

BTW, is there any Cpack documents for the available commands like it is for 
Cmake? Or is the wiki tutorial the documentation like it is for Ctest?

OT, when will the cmake2.6 released?

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] CPack

2007-09-17 Thread Alexander.Camek
Hello List,

I want to use the CPACK generator, but the tutorial 
http://www.cmake.org/Wiki/CMake:Packaging_With_CPack is not quite good.
Perhaps somebody knows a better site.

When I run make with make package, then I get following error:
CPack Error: Cannot find a sutable ZIP program <- an I is missing in suitable ;)
CPack Error: Cannot initialize the generator

In my cmake file, I use following commands:
IF(WIN32)
  SET(CPACK_GENERATOR ZIP)
  SET(CPACK_SOURCE_GENERATOR ZIP)
ELSE(WIN32)
  SET(CPACK_GENERATOR TGZ)
  SET(CPACK_SOURCE_GENERATOR TGZ)
ENDIF(WIN32)
INCLUDE(CPack)

But on the other side I do have 7zip installed. 7zip is working because I 
unpack some files during my build process.
So does the current release 2.4.7 support 7zip?
If not so then you should add this info to 
http://www.cmake.org/Wiki/CMake:CPackPackageGenerators.

Thanks for your help.

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] Project and specific variables

2007-08-01 Thread Alexander.Camek
Hi Bill,

> > Hi List,
> >
> > I had a discussion last time and the topic of the 
> discussion was following: 
> >
> > When you use PROJECT, you normally get the two variables 
> _SOURCE_DIR and _BINARY_DIR.
> > As I got informed these both variables are only used for 
> backward compatibility and shall not be used anymore.
> > Instead of that someone may use CMAKE_CURRENT_SOURCE_DIR.
> >
> > Can somebody tell me if that's right or can the project 
> variables used?
> >   
> Those variables are not going away as far as I know.   I am 
> not sure who 
> informed you of that, but they were wrong.

Thanks for the clarification. 

Greetings 

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Project and specific variables

2007-08-01 Thread Alexander.Camek
Hi List,

I had a discussion last time and the topic of the discussion was following: 

When you use PROJECT, you normally get the two variablse 
_SOURCE_DIR and _BINARY_DIR.
As I got informed these both varibales are only used for backward compatibility 
and shall not be used anymore.
Instead of that someone may use CMAKE_CURRENT_SOURCE_DIR.

Can somebody tell me if that's right or can the project variables used?

Thanks for clearing the problem.

Greetings 

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

RE: [CMake] Quoted String

2007-07-31 Thread Alexander.Camek
Hi Brandon, 

> > Hi List,
> >
> > I want to add a definition to the compiler, so I do an 
> ADD_DEFINITIONS().
> > The defintion I want to add is a quoted string which should 
> be parsed with leading and ending ".
> > So I tried to escape it with \, but this doesn't also work.
> >
> > It should look like 
> ADD_DEFINITIONS(-DPPATH="${path_to_somewhere}"), and then in 
> the used c file the preprocessor will parse PPATH to 
> "/path_to_somewhere".
> > But it currently pares it wihtout the quote sign. In the c 
> file it will be used as a char*, so the quotes are important.
> >
> > How can this be done?
> 
> It's a nightmare but it can be done.  Chicken does it.  You 
> have to be really really careful about all the different 
> levels of escapes and quotes.  Sometimes \" is all you need.  
> Sometimes \\\" is what you need, because you need double \\ 
> to survive CMake argument processing.
>  It doesn't help that MACROs consume quotes when they 
> shouldn't, as per bug #5389.  The first thing you need to do 
> is figure out the exact point in your conversion(s) where 
> you're losing the quotes.  \" does work in SET assignments.

It seems that \\\ has fixed my problem.

Thanks for your help.

Greetings 

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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

[CMake] Quoted String

2007-07-31 Thread Alexander.Camek
Hi List,

I want to add a definition to the compiler, so I do an ADD_DEFINITIONS().
The defintion I want to add is a quoted string which should be parsed with 
leading and ending ".
So I tried to escape it with \, but this doesn't also work.

It should look like ADD_DEFINITIONS(-DPPATH="${path_to_somewhere}"), and then 
in the used c file the preprocessor will parse PPATH to "/path_to_somewhere".
But it currently pares it wihtout the quote sign. In the c file it will be used 
as a char*, so the quotes are important.

How can this be done?

Thnaks for your help.

Greetings

Alexander



Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

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