[CMake] Strip a prefix from a string

2009-01-09 Thread Robert Dailey
Hi, Suppose I have a string called "foobar". I want to be able to strip a specific prefix from that string and have the suffix returned to me. So if I wanted to strip "foo", I would get "bar" back. What's the easiest way of doing this in CMake? ___ CMake

Re: [CMake] What sets UNIX, WIN32, et al.?

2009-01-09 Thread Alexander Neundorf
Hi Phil, On Saturday 10 January 2009, Phil Smith wrote: ... > What's happening is that none of the WIN32, APPLE, UNIX variables are being > set. And I'll be ed if I can figure out what normally sets them! > > The CMake command is: > cmake -DCMAKE_TOOLCHAIN_FILE:string=".\zosport.cmake"

[CMake] What sets UNIX, WIN32, et al.?

2009-01-09 Thread Phil Smith
I have a CMake setup that works for me. Our CMake setup is kind of complex, due to use of a cross-compiler for z/OS. A colleague (geographically remote) has been using it as well, with the same setup (but slightly different directories). I had to make some changes to our added-on tools because

Re: [CMake] target to copy include files?

2009-01-09 Thread Timenkov Yuri
On Sat, Dec 20, 2008 at 3:09 AM, Brad Aisa wrote: > I would like to create a target that will copy (or link) a big whack of > include files defined in my project to a local /include folder. (They start > life in a bunch of subfolders, and some of them are generated > programmatically during the b

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Alin M Elena
Hi Martin, the compiler decides which files get preprocessed and which files not. here is some info from ifort o Filenames with the suffix .f, .for, or .ftn are interpreted as fixed-form Fortran source files. o Filenames with the suffix .fpp, .F, .F

Re: [CMake] Volunteering to maintain two new Find Modules

2009-01-09 Thread Hendrik Sattler
Philip Lowman schrieb: > On Fri, Jan 9, 2009 at 7:32 AM, Philip Lowman wrote: > >> On Thu, Jan 8, 2009 at 5:22 PM, Albert Astals Cid wrote: >> >>> if (LibOpenJPEG_OPENJPEG_LIBRARY) >>> set (LibOpenJPEG_LIBRARIES ${openjpeg_LIBRARY}) >>> endif (LibOpenJPEG_OPENJPEG_LIBRARY) >> >> If you spot any

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Martin Apel
Michael Wild wrote: > On 9. Jan, 2009, at 10:26, Martin Apel wrote: > > >> Michael Wild wrote: >> >>> On 9. Jan, 2009, at 9:27, Martin Apel wrote: >>> >>> >>> Hi all, I am experiencing a problem with one Fortran source file containing a module definition. Unf

Re: [CMake] Volunteering to maintain two new Find Modules

2009-01-09 Thread Philip Lowman
On Fri, Jan 9, 2009 at 7:32 AM, Philip Lowman wrote: > On Thu, Jan 8, 2009 at 5:22 PM, Albert Astals Cid wrote: > >> if (LibOpenJPEG_OPENJPEG_LIBRARY) >> set (LibOpenJPEG_LIBRARIES ${openjpeg_LIBRARY}) >> endif (LibOpenJPEG_OPENJPEG_LIBRARY) > > > If you spot any find modules with this syntax t

Re: [CMake] Volunteering to maintain two new Find Modules

2009-01-09 Thread Philip Lowman
On Thu, Jan 8, 2009 at 5:22 PM, Albert Astals Cid wrote: Ok, so at the end it is > > find_path(LibOpenJPEG_INCLUDE_DIR openjpeg.h > PATH_SUFFIXES openjpeg openjpeg-1.0) > > find_library(LibOpenJPEG_OPENJPEG_LIBRARY openjpeg) > > if (LibOpenJPEG_OPENJPEG_LIBRARY) > set (LibOpenJPEG_LIBRA

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Michael Wild
On 9. Jan, 2009, at 10:26, Martin Apel wrote: Michael Wild wrote: On 9. Jan, 2009, at 9:27, Martin Apel wrote: Hi all, I am experiencing a problem with one Fortran source file containing a module definition. Unfortunately the whole source file is enclosed in '#ifdef WINDOWS'. On Linux

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Arjen Markus
> Yes, I know. But my problem is not with the compiler itself, but with > CMake. It seems to assume, that during scanning of dependency and module > information, > files with a suffix of ".f" don't have to be preprocessed, whereas files > with ".F" are preprocessed. I am searching for a way to tell

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Martin Apel
Arjen Markus wrote: >> You are right, that this is uncommon. But I'm trying to replace an >> existing "build system" for some thousands of files, which preprocesses >> all Fortran files, even those with ".f" suffix. Unfortunately this is >> something I can't change. >> I could use the approach you

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Arjen Markus
>> > You are right, that this is uncommon. But I'm trying to replace an > existing "build system" for some thousands of files, which preprocesses > all Fortran files, even those with ".f" suffix. Unfortunately this is > something I can't change. > I could use the approach you suggest, but I'd like

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Martin Apel
Michael Wild wrote: > On 9. Jan, 2009, at 9:27, Martin Apel wrote: > > >> Hi all, >> >> I am experiencing a problem with one Fortran source file containing a >> module definition. Unfortunately the whole source file is enclosed in >> '#ifdef WINDOWS'. On Linux this causes the build process to fa

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Michael Wild
On 9. Jan, 2009, at 9:27, Martin Apel wrote: Hi all, I am experiencing a problem with one Fortran source file containing a module definition. Unfortunately the whole source file is enclosed in '#ifdef WINDOWS'. On Linux this causes the build process to fail, because cmake wants to copy a gener

[CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Martin Apel
Hi all, I am experiencing a problem with one Fortran source file containing a module definition. Unfortunately the whole source file is enclosed in '#ifdef WINDOWS'. On Linux this causes the build process to fail, because cmake wants to copy a generated .mod file, which does not exist. The file co