Re: [CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-25 Thread Marcel Loose
Done, see Note 0018597 Best regards, Marcel Loose. On Wed, 2009-11-25 at 19:16 +0100, Alexander Neundorf wrote: > On Wednesday 25 November 2009, Marcel Loose wrote: > > Hi Alex, > > > > Maybe I'm overlooking all kinds of side effects, but the problem is in > > line 6 of CMakeFortranInformation.c

Re: [CMake] get_file_name_component - how to return true extension

2009-11-25 Thread Brian Davis
Yes so I did find the string regexp functions and the following seems to be working for me. For example (in case anyone else sees this thread and finds it helpful) SET( FILE_NAME openssl-0.9.8a.tar.gz ) STRING( REGEX REPLACE "[.]gz" "" FILE_NAME_NO_EXT ${FILE_NAME} ) STRING( REGEX REPLACE "[.]t

Re: [CMake] get_file_name_component - how to return true extension

2009-11-25 Thread Eric Noulard
2009/11/25 Brian Davis : > > for a given file of the form: > > openssl-0.9.8a.tar.gz > > I call as an example: > >  get_filename_component( TAR_EXT openssl-0.9.8a.tar.gz EXT ) > > and I get for TAR_EXT > > .9.1.tar.gz you should be getting: ".9.8a.tar.gz" but I think it's a copy/paste typo > Whic

[CMake] get_file_name_component - how to return true extension

2009-11-25 Thread Brian Davis
for a given file of the form: openssl-0.9.8a.tar.gz I call as an example: get_filename_component( TAR_EXT openssl-0.9.8a.tar.gz EXT ) and I get for TAR_EXT .9.1.tar.gz Which is not quite what I was expecting. I was expecting .gz and with successive calls I would get .tar Is there a mechan

Re: [CMake] cmake deletes cache when source patch contains symlink to complier directory

2009-11-25 Thread Russell Yanofsky
I would guess unresolving the symlinks could make the CMAKE_USE_RELATIVE_PATHS option work better, but in the normal case I guess it shouldn't matter whether symlink or non-symlink paths are used. I just think it's important for CMakeCache.txt and CMakeCCompiler.cmake to use the same path. - Russ

Re: [CMake] how consider pre build

2009-11-25 Thread Alexander Neundorf
On Wednesday 25 November 2009, Sören Freudiger wrote: > Hi > One Problem. > > There's one file in my sources that produces a cxx file in a pre build step > (similar to qt_ui or moc, swig ...) > > But the source file isn't a h,c,cxx, file. It's a .if file thus I caonnot > put this to the project sou

Re: [CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-25 Thread Alexander Neundorf
On Wednesday 25 November 2009, Marcel Loose wrote: > Hi Alex, > > Maybe I'm overlooking all kinds of side effects, but the problem is in > line 6 of CMakeFortranInformation.cmake, where get_filename_component() > is called with an incorrect number of arguments. This happens because > ${CMAKE_Fortra

[CMake] how consider pre build

2009-11-25 Thread Sören Freudiger
Hi One Problem. There's one file in my sources that produces a cxx file in a pre build step (similar to qt_ui or moc, swig ...) But the source file isn't a h,c,cxx, file. It's a .if file thus I caonnot put this to the project source files without getting an error. Ok, but step by step... #inp

Re: [CMake] Eclipse CDT 4.0 + CMake (2.8.0)

2009-11-25 Thread Alexander Neundorf
On Wednesday 25 November 2009, Michael Jackson wrote: > The downside of Option #2 is that Eclipse will end up putting > the .project and .cproject files in your source directory which some > folks did not like, which is why they wrote the Eclise CDT generator. "Some folks" being the cmake develope

Re: [CMake] cmake deletes cache when source patch contains symlink to complier directory

2009-11-25 Thread Michael Wild
What has me confused is WHY CMake even does this symlink-resolution. IMHO it should never notice that /home/russ/test_symlink/bin/gcc even exists. Michael On 25. Nov, 2009, at 18:22 , Russell Yanofsky wrote: Hi Michael, Thanks for trying this out. It wasn't too hard to debug after I n

Re: [CMake] cmake deletes cache when source patch contains symlink to complier directory

2009-11-25 Thread Russell Yanofsky
Hi Michael, Thanks for trying this out. It wasn't too hard to debug after I noticed the discrepancy in the CMake output. The simple explanation of the bug is that when CMake runs, it writes the CMAKE_C_COMPILER value out to two different files: CMakeCache.txt CMakeFiles/CMakeCCompiler.cmake

Re: [CMake] cmake deletes cache when source patch contains symlink to complier directory

2009-11-25 Thread Michael Wild
Hi Russ I can't claim to fully understand your explanation, but I tried your steps on Mac OS X 10.6 and CMake-2.8 and I can reproduce this error. Really, really weird stuff! Bet it took you quite some time, effort and nerves to track this one down... Michael On 25. Nov, 2009, at 17:35

[CMake] cmake deletes cache when source patch contains symlink to complier directory

2009-11-25 Thread Russell Yanofsky
(I tried to create a Mantis bug, but Mantis won't let me log in, and when I try to reset the password, I see "This account is protected. You are not allowed to access this until the account protection is lifted." I tried creating a completely new account, and I see the same message with that.) Sim

Re: [CMake] Eclipse CDT 4.0 + CMake (2.8.0)

2009-11-25 Thread Michael Jackson
The downside of Option #2 is that Eclipse will end up putting the .project and .cproject files in your source directory which some folks did not like, which is why they wrote the Eclise CDT generator. For me, Option #2 is worth the couple of downsides. I also wrote the Wiki entry for optio

Re: [CMake] enable_language( ... OPTIONAL) causes error or second cmake run

2009-11-25 Thread Marcel Loose
Hi Alex, Maybe I'm overlooking all kinds of side effects, but the problem is in line 6 of CMakeFortranInformation.cmake, where get_filename_component() is called with an incorrect number of arguments. This happens because ${CMAKE_Fortran_COMPILER} is empty. If I simply put quotes around ${CMAKE_Fo

Re: [CMake] problem about Fortran and C mixing

2009-11-25 Thread Biddiscombe, John A.
Rather than try to explain, have a look at this one I made earlier it inherits stuff from the parent project, but you should see what’s going on. http://gitorious.org/hdf5/hdf5-v18/blobs/master/fortran/CMakeLists.txt scroll down until you see #---

Re: [CMake] cmake HEAD: cpack rpm generator seems broken on openSuse 11.2

2009-11-25 Thread Eric Noulard
2009/11/25 Eric Noulard : > > Moreover would you try to replace the current CPackRPM.cmake with the > one I attach to this mail > and retry with the very same CMakeLists.txt. For the list, the problem seems to be e regression due to a Fedora specific bug fix!! I did re-open that bug: http://publi

Re: [CMake] problem with add_custom command

2009-11-25 Thread Michael Wild
If you'd read on, you would see that I first CREATE a tar file, then EXTRACT it and then show that the contents have been restored. Michael On 25. Nov, 2009, at 14:56 , Brian J. Davis wrote: In your example you use "cvf". This creates a tar file which is not what I want to do. I want t

Re: [CMake] Fortran name mangling

2009-11-25 Thread Brad King
Biddiscombe, John A. wrote: However, for unknown reasons, when I use this code on the win32 machine which is compiling the primary fortran projects happily, this happens [snip] The question is, why is/are the solution files being corrupted when running in the CFortranInterface try compile stag

[CMake] including generated cmake-files from a ExternalPackage

2009-11-25 Thread jens persson
Hello, I have a problem relating to ExterlalPackage I have to project (main and lib in this example) that is placed in two directories next to each other where main needs lib to be able to link. I have created a set up so that the main procject uses ExternalProject to compile lib. This works fla

Re: [CMake] problem with add_custom command

2009-11-25 Thread Michael Wild
Works fine for me on my Mac. Can't help with Windows 7 (or rather, 6.1, but then the marketing guys at MS probably figured to round that up to 7... ;-)) as I don't have access to it. $ mkdir test $ echo "Hello World" > test/hello.txt $ cmake -E tar cvf test.tar test drwxr-xr-x mwildstaff

Re: [CMake] Mac and Win32 bundling

2009-11-25 Thread David Cole
Please do post your info here as well. On Wed, Nov 25, 2009 at 5:01 AM, Filip Wänström wrote: > Just wanted to add an update: I have managed to create a stand alone > MacOSX OpenSceneGraph app that works. Basically it boils down to > scripting the install_name_tool to create loader_paths that po

Re: [CMake] problem with add_custom command

2009-11-25 Thread David Cole
"cmake -E tar xvf" is implemented... Does this happen with other tar files, or just that one? On Tue, Nov 24, 2009 at 11:07 PM, Brian Davis wrote: > So I found this thread below and tried the command at the promp (Win7): > > cmake -E tar xvf > > CMake Error: Problem with tar_open(): No such fi

Re: [CMake] Mac and Win32 bundling

2009-11-25 Thread Filip Wänström
Just wanted to add an update: I have managed to create a stand alone MacOSX OpenSceneGraph app that works. Basically it boils down to scripting the install_name_tool to create loader_paths that points correctly. I will create an example of this and will be posting that to the osg-users mailing list

Re: [CMake] Cmake support for Csharp?

2009-11-25 Thread Mathieu Malaterre
Joseph, You can have a look at what I am doing in GDCM. I can build the C++ library and wrap the interface using SWIG in C#. Ref: http://gdcm.sourceforge.net/ What you really want to look at are the CMake files here: http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/ or the bug report: htt

[CMake] Fortran name mangling

2009-11-25 Thread Biddiscombe, John A.
First off, I'd like to say thanks to whoever is responsible for the huge improvements in Fortran support in cmake-1.8.0. I've got most of the hdf5 Fortran testing framework essentially running smoothly on win32 intel visual fortran 11.x - no changes necessary to the default Fortran flags and det