[CMake] Conditional dependency

2007-11-06 Thread Nicholas Yue
Hi, I have a project which is build a library fine with CMake (has around 100 source file). ADD_LIBRARY ( mylib STATIC a.cpp b.cpp c.cpp etc ) The content in b.cpp is relevant to only some platform platform. How do I tell CMake that file b.cpp is only to be include as depends of

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

2007-11-06 Thread Jesper Eskilson
Brandon Van Every wrote: 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

Re: [CMake] Conditional dependency

2007-11-06 Thread Salvatore Iovene
On 11/6/07, Nicholas Yue [EMAIL PROTECTED] wrote: Hi, I have a project which is build a library fine with CMake (has around 100 source file). ADD_LIBRARY ( mylib STATIC a.cpp b.cpp c.cpp etc ) The content in b.cpp is relevant to only some platform platform. How do I tell CMake

[CMake] Re: Getting started with CMake macros

2007-11-06 Thread Thomas Sondergaard
Please ignore the previous post! I found the solution myself. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

[CMake] Getting started with CMake macros

2007-11-06 Thread Thomas Sondergaard
Is there a beginners guide to macros somewhere? I tried something basic like wrapping up find_library like this: macro(my_find_library arg1 arg2) find_library(arg1 arg2) endmacro(my_find_library) my_find_library(CPPUNIT cppunit) To my surprise it didn't work at all. If I browse

Re: [CMake] Conditional dependency

2007-11-06 Thread Eric Noulard
2007/11/6, Salvatore Iovene [EMAIL PROTECTED]: On 11/6/07, Nicholas Yue [EMAIL PROTECTED] wrote: As there are hundreds of file, I want to avoid duplicating and add to maintainence. Try this: IF(NOT WIN32) SET(b_SOUCE b.cpp) ENDIF(NOT WIN32) ADD_LIBRARY ( myLib STATIC a.cpp

Re: [CMake] Getting started with CMake macros

2007-11-06 Thread Eric Noulard
2007/11/6, Thomas Sondergaard [EMAIL PROTECTED]: Is there a beginners guide to macros somewhere? I tried something basic like wrapping up find_library like this: macro(my_find_library arg1 arg2) find_library(arg1 arg2) endmacro(my_find_library) my_find_library(CPPUNIT cppunit) To my

[CMake] Link directories order

2007-11-06 Thread Renaud Detry
Hi all, I posted an issue about link dir order a week ago, but it seems nobody has replied to it :-/ Is there a reason like one should not use env var, but FindXXX scripts instead, or did it simply slip through unnoticed? The initial post follows. Thanks, Renaud. Hello, I'm having trouble

Re: [CMake] Conditional dependency

2007-11-06 Thread Hendrik Sattler
Zitat von Eric Noulard [EMAIL PROTECTED]: 2007/11/6, Salvatore Iovene [EMAIL PROTECTED]: On 11/6/07, Nicholas Yue [EMAIL PROTECTED] wrote: As there are hundreds of file, I want to avoid duplicating and add to maintainence. Try this: IF(NOT WIN32) SET(b_SOUCE b.cpp) ENDIF(NOT WIN32)

Re: [CMake] Link directories order

2007-11-06 Thread Hendrik Sattler
Zitat von Renaud Detry [EMAIL PROTECTED]: I posted an issue about link dir order a week ago, but it seems nobody has replied to it :-/ Is there a reason like one should not use env var, but FindXXX scripts instead, or did it simply slip through unnoticed? Did you try to give the whole path to

[CMake] Re: Qt version of Cmake

2007-11-06 Thread Mike Jackson
Well, there is a weekend of my life I'll never get back ;-) ... I'll take a look and get back to you. I have been learning a bunch about Qt (relearning actually) so maybe we can not stumble over each other... Cheers -- Mike Jackson Senior Research Engineer Innovative Management

Re: [CMake] Qt version of Cmake

2007-11-06 Thread Mike Jackson
I was confused about function callbacks instead of C++ abstract classes but then I remember that not all of cmake is probably c++ (ncurses I would guess). Would still be a cleaner OOP to use abstract classes for the error/message callbacks. -- Mike Jackson Senior Research Engineer

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

Re: [CMake] Link directories order

2007-11-06 Thread Renaud Detry
Did you try to give the whole path to the lib instead of seperate library name and path? Can that be done without writing the lib suffix explicitly (not cross- platform)? And since you build the lib yourself with a cmake TARGET, the TARGET name should be used as link dependency. I don't

[CMake] list of targets

2007-11-06 Thread James Bigler
Is it possible to get a list of targets, such as the list of libraries or executables? I have dozens of libraries and executables I need to install as part of my package, and was wondering if there was something easier than adding the install rule for each one by hand. It would be great

Re: [CMake] Link directories order

2007-11-06 Thread Hendrik Sattler
Zitat von Renaud Detry [EMAIL PROTECTED]: Did you try to give the whole path to the lib instead of seperate library name and path? Can that be done without writing the lib suffix explicitly (not cross-platform)? And since you build the lib yourself with a cmake TARGET, the TARGET name

Re: [CMake] Qt version of Cmake

2007-11-06 Thread Mike Jackson
I have been able to pull the latest CVS sources for CMake (although I had to bounce through another server) and the first issue I have is one with Qt versioning. QtCMake wants 4.3.0 minimum. ParaView ONLY wants 4.2.x. Do you see a problem here? Also, with the problems that Qt is having

[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

Re: [CMake] Qt version of Cmake

2007-11-06 Thread Bill Hoffman
Mike Jackson wrote: I have been able to pull the latest CVS sources for CMake (although I had to bounce through another server) and the first issue I have is one with Qt versioning. QtCMake wants 4.3.0 minimum. ParaView ONLY wants 4.2.x. Do you see a problem here? Also, with the problems

[CMake] Re: FIND_PATH

2007-11-06 Thread Leon Moctezuma
On Nov 2, 2007 1:28 PM, Leon Moctezuma [EMAIL PROTECTED] wrote: Hi, I created a FindGECKO modul, which tries to look for the NPAPI headers for creating FireFox plug-ins, the problem is that in some distributions the paths have directories with it's version number... for example:

[CMake] Cvs version 'Segmentation Fault'

2007-11-06 Thread Baptiste Derongs
Hello all, I've just downloaded the cvs version of Cmake, I built it with the regular version of Cmake (2.4.7). My project uses a ctest script. In this script I set CMake and Ctest path to the Cvs version. When I call the script with the Cvs version of ctest, I get a Segmentation Fault. It is

Re: [CMake] Link directories order

2007-11-06 Thread Renaud Detry
Did you build it using ADD_LIBRARY? If yes: PROJECT(HELLO) ADD_LIBRARY(Hello foo.c) ADD_EXECUTABLE(HelloBin bar.c) TARGET_LINK_LIBRARIES(HelloBin Hello) This is exactly what I have. ADD_LIBRARY defines the TARGET Hello in the above lines. That should link to the local libHello even if you

[CMake] QT4_WRAP_UI, INCLUDE_DIRECTORIES and source tree structure

2007-11-06 Thread Christiaan Putter
Hi there guys, First off I'm new to cmake (and c++ and qt too :-) ), so please bear this in mind. I'm having some trouble with my source tree layout, and don't know if I'm doing this right. I'll first explain what I've done, and then tell you what's not working. My source tree: project

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

2007-11-06 Thread Brandon Van Every
On Nov 6, 2007 8:19 AM, Bill Hoffman [EMAIL PROTECTED] wrote: You might want to look at Modules/Platform/Windows-cl.cmake... It uses EXEC_PROGRAM to get the version of the MS compiler. You could see how that works. Look in CVS CMake. It runs the C preprocessor to obtain a value for _MSC_VER.

Re: [CMake] Link directories order

2007-11-06 Thread Bill Hoffman
Renaud Detry wrote: Did you build it using ADD_LIBRARY? If yes: PROJECT(HELLO) ADD_LIBRARY(Hello foo.c) ADD_EXECUTABLE(HelloBin bar.c) TARGET_LINK_LIBRARIES(HelloBin Hello) This is exactly what I have. ADD_LIBRARY defines the TARGET Hello in the above lines. That should link to the local

Re: [CMake] Cvs version 'Segmentation Fault'

2007-11-06 Thread Bill Hoffman
Baptiste Derongs wrote: Hello all, I've just downloaded the cvs version of Cmake, I built it with the regular version of Cmake (2.4.7). My project uses a ctest script. In this script I set CMake and Ctest path to the Cvs version. When I call the script with the Cvs version of ctest, I get a

Re: [CMake] Conditional dependency

2007-11-06 Thread Alan W. Irwin
On 2007-11-06 12:44+0100 Hendrik Sattler wrote: Zitat von Eric Noulard [EMAIL PROTECTED]: The general pattern is the following: # put unconditional sources in SET(MYLIB_SRC c.cpp g.cpp any otherunconditional source) # then ADD the conditional ones IF(WIN32) SET(MYLIB_SRC ${MYLIB_SRC}

Re: [CMake] Conditional dependency

2007-11-06 Thread Bill Hoffman
Alan W. Irwin wrote: However, before I do that work, does anybody know whether LIST(APPEND...) was available for cmake-2.4.5 (the minimum version of cmake for the PLplot build)? To Bill Hoffman: at one time you were keen on committing the results of cmake --help-full for each version of cmake

Re: [CMake] Link directories order

2007-11-06 Thread Bill Hoffman
Renaud Detry wrote: As a result, Demo is linked against an obsolete installed version of Hello, instead of the local fresh one. Note that /tmp/lib was empty when I ran cmake. [EMAIL PROTECTED] $ export LDFLAGS=-L/tmp/lib OK, CMake does not know what you are doing here. It is

Re: [CMake] Link directories order

2007-11-06 Thread Renaud Detry
Renaud Detry wrote: Did you build it using ADD_LIBRARY? If yes: PROJECT(HELLO) ADD_LIBRARY(Hello foo.c) ADD_EXECUTABLE(HelloBin bar.c) TARGET_LINK_LIBRARIES(HelloBin Hello) This is exactly what I have. ADD_LIBRARY defines the TARGET Hello in the above lines. That should link to the local

[CMake] Import libraries prefix bug under windows?

2007-11-06 Thread Ronan Collobert
Hi, I have been using CMake for quite a while now under Linux/MacOSX/Cygwin for a large project. Recently I have been trying to make it work under Windows, using the freely available to download Windows SDK. (cmake -G NMake Makefiles) I encountered a small problem, which might be a CMake

Re: [CMake] Include_Directories

2007-11-06 Thread Alexander Neundorf
On Tuesday 06 November 2007, [EMAIL PROTECTED] wrote: 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

Re: [CMake] QT4_WRAP_UI, INCLUDE_DIRECTORIES and source tree structure

2007-11-06 Thread Alexander Neundorf
On Wednesday 07 November 2007, Christiaan Putter wrote: Thanks for the reply Alexander, I've tried both and , though makes more sense since ui_*.h isn't in the source tree and cmake should be telling the compiler where to look for it. Then you need to add the include path. So when using

[CMake] Building cmake to use stlport / Solaris

2007-11-06 Thread Andrew Roark
Hello, I am trying to install cmake 2.4.7 on a solaris (5.8) machine. It bootstraps ok but fails with: [ 7%] Built target testFail Linking CXX executable ../../bin/testHashSTL Undefined first referenced symbol in file

[CMake] Linking problem

2007-11-06 Thread Salvatore Iovene
Hi, I'm not 100% sure this is really a CMake related question, but I'll fire it up anyway: I'm building a series of static libraries, name them liba.a, libb.a and libc.a, and linking them into a shared library libfoo.so. Then I'm building libx.a liby.a and libz.a and linking them into the shared

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.