Re: [CMake] [Paraview] Forcing a Qt version

2008-10-07 Thread John Biddiscombe
Renato by modifying my PATH before the first time I run cmake on an empty build directory. I think the big clue here is the "empty build directory". I use multiple Qt versions and CMake is quite pathological about them. If you try to switch from one version to another, you really need to wip

Re: [CMake] [Paraview] Forcing a Qt version

2008-10-07 Thread clinton
I do multiple Qt versions simply by modifying my PATH before the first time I run cmake on an empty build directory. To verify that, I can run "qmake --version" from a console/terminal, to make sure its the right one before I run cmake for the first time. Clint On Tuesday 07 October 2008 4:38

Re: [CMake] [Paraview] Forcing a Qt version

2008-10-07 Thread Renato N. Elias
I gave up and employed the dirtiest solution. Deleted Qt 4.3.4 and used Qt 4.4.2. Nothing more to choose, CMake finally got convinced that I only have one Qt version... ...In the end, instead of forcing a Qt version CMake forced me to delete one of them :o( Renato. Dominik Szczerba wrote

Re: [CMake] Output of ADD_CUSTOM_COMMAND generated multiple times

2008-10-07 Thread Alan W. Irwin
On 2008-10-07 16:09-0400 Brad King wrote: Now targets b and c and build in parallel, but neither will build until 'a' is generated. Thanks, Brad, for your further explanation and example. My method (which I started to use as a result of misinterpreting something you said on this topic before)

Re: [CMake] Output of ADD_CUSTOM_COMMAND generated multiple times

2008-10-07 Thread Brad King
Alan W. Irwin wrote: > On 2008-10-07 10:22+0200 Martin Apel wrote: > >> Hi all, >> >> I'm experiencing the following problem with ADD_CUSTOM_COMMAND: >> The commands defined for it are executed multiple times, if multiple >> targets depend on it and I run a parallel make afterwards. >> An example

Re: [CMake] Output of ADD_CUSTOM_COMMAND generated multiple times

2008-10-07 Thread Alan W. Irwin
On 2008-10-07 10:22+0200 Martin Apel wrote: Hi all, I'm experiencing the following problem with ADD_CUSTOM_COMMAND: The commands defined for it are executed multiple times, if multiple targets depend on it and I run a parallel make afterwards. An example makes this easier to understand: PROJEC

Re: [CMake] How to specify that a target link library is shared ?

2008-10-07 Thread Andy Lego
Hello, The def file was always a bit of a mystery to me, since you do not specify it on the command line but the linker just finds it magically. I much prefer the import/export mechanism. Here is what I typically did when I still did some Win32 programming: Add the following code in your header

[CMake] Setting Visual Studio Pre-Link Events with CMAKE

2008-10-07 Thread Barnes, James R. (LARC-D107)[ARINC]
Is there anyway to set a Visual Studio Build Pre-Link Event command from a list file? I'm currently using a small utility program that uses DUMPBIN to strip out all the public methods from the object files to create the project's DEF file in creating a DLL. The .vcproj file would have the fol

Re: [CMake] How to specify that a target link library is shared ?

2008-10-07 Thread Andrea Borsic
Hi All, Yes it is the .def file that defines the import/exports, but the linking stage fails before taking care of these aspects: it looks for triagle_lib.lib which is not there and stops before considering symbol resolutions. Thanks for your help, I will be reading all the emails that came

[CMake] compilation errors of a program that uses VTK and GDCM via CMake

2008-10-07 Thread Stéphane CALANDE
Hi, I'm trying to compile a source c++ that uses VTK and GDCM libraries ( http://info.fundp.ac.be/~scalande/problem/gdcmorthoplanes.cxxif it is useful... ). I have installed the last versions of VTK and GDCM, and I use CMake to gen

Re: [CMake] How to specify that a target link library is shared ?

2008-10-07 Thread Joshua L. Blocher
Isn't the def files the defines the export symbols. Boudewijn Rempt wrote: On Tue, 7 Oct 2008, Andrea Borsic wrote: Dear All, I am a recent user of CMake, and I cannot figure out how to tell CMake that a TARGET_LINK_LIBRARY is shared. I am working under Windows Xp with MS VisualStudio 2008

Re: [CMake] Disable warnings in Visual Studio Express 2008

2008-10-07 Thread user790 user790
> >> > 1) What does your "unsuccess" mean? > It means that the outcome is a visual studio project which does not use the expected "/wd" flag for compilation. > > 2) You can edit flags from GUI, this should work. > If you mean the Visual Studio GUI, sure, but I would have to do that everyt

Re: [CMake] Disabling warnings in Visual Studio Express 2008

2008-10-07 Thread user790 user790
2008/10/6 Werner Smekal <[EMAIL PROTECTED]> > Hi, > > one thing I would try is > > add_definitions( -wd1234 ) > > since, cmake changes the - or / automatically for the compiler, as well as > > add_definitions( "/wd1234" ) None of these work here. If that indeed works for other configurations, I

Re: [CMake] How to specify that a target link library is shared ?

2008-10-07 Thread Boudewijn Rempt
On Tue, 7 Oct 2008, Andy Lego wrote: > Hello, > > The problem is that you are not exporting any symbols in your library. > > On Windows even with shared libraries you have a .lib file that describes > all the exported symbols. Ah, I remembered right! Boudewijn

Re: [CMake] How to specify that a target link library is shared ?

2008-10-07 Thread Boudewijn Rempt
On Tue, 7 Oct 2008, Andrea Borsic wrote: > Dear All, > > I am a recent user of CMake, and I cannot figure out how to tell CMake that a > TARGET_LINK_LIBRARY is shared. I am working under Windows Xp with MS > VisualStudio 2008, and the following is my CMakeLists file: > > PROJECT(Triangle) > > A

Re: [CMake] How to specify that a target link library is shared ?

2008-10-07 Thread Eric Noulard
2008/10/7 Andrea Borsic <[EMAIL PROTECTED]>: > Dear All, > > I am a recent user of CMake, and I cannot figure out how to tell CMake that > a TARGET_LINK_LIBRARY is shared. I am working under Windows Xp with MS > VisualStudio 2008, and the following is my CMakeLists file: > > PROJECT(Triangle) > > A

Re: [CMake] How to specify that a target link library is shared ?

2008-10-07 Thread Andy Lego
Hello, The problem is that you are not exporting any symbols in your library. On Windows even with shared libraries you have a .lib file that describes all the exported symbols. Andy On Tue, Oct 7, 2008 at 9:05 AM, Andrea Borsic <[EMAIL PROTECTED]>wrote: > Dear All, > > I am a recent user of C

[CMake] How to specify that a target link library is shared ?

2008-10-07 Thread Andrea Borsic
Dear All, I am a recent user of CMake, and I cannot figure out how to tell CMake that a TARGET_LINK_LIBRARY is shared. I am working under Windows Xp with MS VisualStudio 2008, and the following is my CMakeLists file: PROJECT(Triangle) ADD_LIBRARY(triangle_lib SHARED triangle.c) ADD_EXECUTAB

Re: [CMake] WIN32_EXECUTABLE - Config specific settings for visual studio generated project files?

2008-10-07 Thread Stefan Buschmann
Don't forget to add the preprocessor definition as well, because this might be used in some header files to check whether a WINDOWS or a CONSOLE app is going to be compiled. I test for this definition in my own project, and it might be even used inside the Windows headers, so this should always

Re: [CMake] [Paraview] Forcing a Qt version

2008-10-07 Thread Renato N. Elias
Michael and Clinton I guess I'm facing a CMake's bug. I'm actually working with two Qt4 versions: Qt 4.4.2 (official distribution, including VS2008 integration) and Qt 4.3.4 (open source distribution). I've set the QTDIR variable as Michael suggested (in two places. Firstly in my own environm

Re: [CMake] Disable warnings in Visual Studio Express 2008

2008-10-07 Thread Mehdi Rabah
hi, to disable useless warnings in visual studio 08, this works for me : add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo" ) > On Mon, Oct 6, 2008 at 9:37 AM, Timenkov Yuri <[EMAIL PROTECTED]> wrote: > > > 2008/10/2 user790 user790 <[EMAIL PROTECTED]> > >> Disabling sp

[CMake] CMake problem with VTK and GDCM

2008-10-07 Thread Stéphane CALANDE
Hello, I'm trying to use CMake to generate a makefile to compile a c++ program that uses VTK and GDCM ( http://info.fundp.ac.be/~scalande/problem/gdcmorthoplanes.cxx) Have a look to this picture to see a summary of the problem I meet : http://info.fundp.ac.be/~scalande/problem/gdcm_error12.PNG

Re: [CMake] Using CMake to bootstrap a build source tree via CVS/SVN

2008-10-07 Thread David Cole
If you run EXECUTE_PROCESS to do a checkout before ADD_SUBDIRECTORY it should work fine. Do it conditionally though, or else you'll be doing checkouts constantly. You probably just want to do an update if the directory already exists... HTH, David On Thu, Oct 2, 2008 at 10:16 AM, kent williams <[

[CMake] Forcing a Qt version

2008-10-07 Thread Renato N. Elias
Hi folks, I'm facing a curious problem here. I was using Qt-4.3.4 to compile ParaView in a Windows machine and it had been working fine but after installing a second version of Qt (4.4.2), CMake 2.6 (patch 2 RC-5) seems to be getting confused about which version it should use. Even pointing

Re: [CMake] WIN32_EXECUTABLE - Config specific settings for visual studio generated project files?

2008-10-07 Thread Michael Jackson
Thought this was handy enough to add a wiki entry: http://www.cmake.org/Wiki/VSConfigSpecificSettings Mike On Oct 7, 2008, at 12:49 AM, Jason Eubank wrote: Thanks Stefan, this worked well. My exact usage using your recommendations was as follows: if(WIN32) set_target_properties(WindowApp

[CMake] Install skips some targets

2008-10-07 Thread Petri Hodju
Hi, I have put together a simple build system of which I have attached to this mail a small sample. The sample builds two binaries (bin1 & bin2) and two libraries (lib1 & lib2) so that bin1 depends on lib1, bin2 depends on lib2, and lib1 depends on lib2. The build phase goes just fine but the

Re: [CMake] Using cmake -E copy_directory with subversion

2008-10-07 Thread Mathieu Malaterre
On Tue, Oct 7, 2008 at 5:15 AM, Aurélien Vallée <[EMAIL PROTECTED]> wrote: > Hello, > I have come across a problem using CMake with SVN. > I have a src/shaders directory containing files with extension ".glsl". I > need to create a rule to copy these files in my build directory, since my > program

[CMake] Output of ADD_CUSTOM_COMMAND generated multiple times

2008-10-07 Thread Martin Apel
Hi all, I'm experiencing the following problem with ADD_CUSTOM_COMMAND: The commands defined for it are executed multiple times, if multiple targets depend on it and I run a parallel make afterwards. An example makes this easier to understand: PROJECT(Test) cmake_minimum_required(VERSION 2.6) AD