Re: [CMake] project name

2006-01-30 Thread Alexander Neundorf
> Von: "Gaetan Lehmann" <[EMAIL PROTECTED]> > > On Mon, 30 Jan 2006 11:26:48 +0100, Filipe Sousa <[EMAIL PROTECTED]> wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > Gaetan Lehmann wrote: > >> Hi, > >> > >> Is there a var where the project name is stored ? > > >

[CMake] CMake generated rule is not recognized by make or dependency order?

2006-01-30 Thread Tao Zhang
I have an executable depends on some nonexisting files.I use ADD_CUSTOM_COMMAND to produce these files. However, make reports "no rule" errors even rules are there. Type "make envC.cpp" directly works instead. The rule in the Makefile: envC.cpp: /home/ship2rr/hdrsfaults.h @echo "Building

Re: [CMake] creating a CMakeUtils.cmake ?

2006-01-30 Thread David Cole
How about suggesting a naming convention for "standard" macros then, so that they don't have a name clash with other CMake modules like Find*, Check*, Test*... Perhaps if the macro is named "LogToFile", the file could be named "LogToFileMacro.cmake"? Only 2 cents, ;) David Brad King wrote:

Re: [CMake] creating a CMakeUtils.cmake ?

2006-01-30 Thread Brad King
Alexander Neundorf wrote: Hi, what do you think about creating a cmake module which contains several useful macros ? E.g. stuff like: MACRO(OPTIONAL_PACKAGE name) OPTION(WITH_${name} "ON" "Support ${name}") IF(WITH_${name}) FIND_PACKAGE(${name}) ENDIF(WITH_${name}) ENDM

[CMake] bug in GET_FILENAME_COMPONENT()

2006-01-30 Thread Alexander Neundorf
Hi, GET_FILENAME_COMPONENT(... ABSOLUTE) works only correct when used from the toplevel directory, i.e. CMAKE_SOURCE_DIR. If used from subdirs it interprets relative paths not as relative to the CMAKE_CURRENT_SOURCE_DIR, but also as relative to CMAKE_SOURCE_DIR. I filed a bug report, it's #2

[CMake] creating a CMakeUtils.cmake ?

2006-01-30 Thread Alexander Neundorf
Hi, what do you think about creating a cmake module which contains several useful macros ? E.g. stuff like: MACRO(OPTIONAL_PACKAGE name) OPTION(WITH_${name} "ON" "Support ${name}") IF(WITH_${name}) FIND_PACKAGE(${name}) ENDIF(WITH_${name}) ENDMACRO(OPTIONAL_PACKAGE) (

Re: [CMake] VS8 and cmake 2.2.3 [Fwd: RE: [Fwd: visual studio 2005 free version]]

2006-01-30 Thread Steve Pieper
Hi Bill, Karthik - I've done all the steps on that setup page (including step 5, and confirmed that a Win32 application will build and run). Even so, with cmake 2.2.3 I get the message: "The C compiler "cl" is not able to compile a simple test program. It fails with the following output:

Re: [CMake] VS.NEt generator flag missing

2006-01-30 Thread Darko Miletic
Jorgen Bodde wrote: > Hi all, > > Since a while I am missing this flag from the VS.NET generator: /EHsc > > Every app I compile crashes unless i add it, I nevber had problems with > my apps with older versions of CMakeSetup (using 2.2 patch 2). Is this > flag removed for a reason? Or is this alre

Re: [CMake] VS.NEt generator flag missing

2006-01-30 Thread Brad King
Jorgen Bodde wrote: Since a while I am missing this flag from the VS.NET generator: /EHsc Every app I compile crashes unless i add it, I nevber had problems with my apps with older versions of CMakeSetup (using 2.2 patch 2). Is this flag removed for a reason? Or is this already fixed in newer

[CMake] VS.NEt generator flag missing

2006-01-30 Thread Jorgen Bodde
Hi all, Since a while I am missing this flag from the VS.NET generator: /EHsc Every app I compile crashes unless i add it, I nevber had problems with my apps with older versions of CMakeSetup (using 2.2 patch 2). Is this flag removed for a reason? Or is this already fixed in newer versions?

Re: [CMake] recommended way to test for msvc/cl ?

2006-01-30 Thread Brad King
Alexander Neundorf wrote: Von: Brad King <[EMAIL PROTECTED]> Of course, that is a simple solution. Each of those files should set a variable to indicate it has been loaded. I'll make this change. The :-) How about platform-id's everywhere ? E.g. NETBSD, OPENBSD, IRIX etc. ? Yes

Re: [CMake] Fwd: Add definitions question

2006-01-30 Thread Brad King
Rupert Brooks wrote: I have a source file which can be compiled into two possible executables depending on a compiler definition (Specifically, i get a 3D image processing executable if i set IMAGE_DIMENSION=3, and a 2D executable if IMAGE_DIMENSION=2) I'm having some problems getting this in CM

Re: [CMake] recommended way to test for msvc/cl ?

2006-01-30 Thread Alexander Neundorf
Hi, > Von: Brad King <[EMAIL PROTECTED]> > > Alexander Neundorf wrote: ... > > Why did you actually enclose the CMAKE_C_COMPILER in "..." ? > > I was using the "string MATCHES string" form of the IF statement > because we are trying to move away from the confusing "var MATCHES >

Re: [CMake] recommended way to test for msvc/cl ?

2006-01-30 Thread Alexander Neundorf
Hi, > Von: David Cole <[EMAIL PROTECTED]> > > Wouldn't it be preferable to remain compile independent as much as > possible and avoid CMake blocks that are compiler specific? > > Perhaps a TRY_COMPILE would be more appropriate than the "compiler > matches regex" test... > > You didn

Re: [CMake] recommended way to test for msvc/cl ?

2006-01-30 Thread Brad King
Alexander Neundorf wrote: We've used IF("${CMAKE_C_COMPILER}" MATCHES "^cl$") and this should work for you for now, but... Sure ? This one seems to be set to: D:/Programme/Microsoft Visual Studio 8/VC/bin/cl.exe So I'd go with IF(CMAKE_C_COMPILER MATCHES "cl\\.exe") Actually I thin

Re: [CMake] recommended way to test for msvc/cl ?

2006-01-30 Thread David Cole
I meant "compile*r* independent..." of course... David Cole wrote: Wouldn't it be preferable to remain compile independent as much as possible and avoid CMake blocks that are compiler specific? Perhaps a TRY_COMPILE would be more appropriate than the "compiler matches regex" test... You di

Re: [CMake] recommended way to test for msvc/cl ?

2006-01-30 Thread David Cole
Wouldn't it be preferable to remain compile independent as much as possible and avoid CMake blocks that are compiler specific? Perhaps a TRY_COMPILE would be more appropriate than the "compiler matches regex" test... You didn't actually say when starting this thread why you wanted to detect

Re: [CMake] recommended way to test for msvc/cl ?

2006-01-30 Thread Alexander Neundorf
Hi, > Von: Brad King <[EMAIL PROTECTED]> > > Alexander Neundorf wrote: > > There is a variable CMAKE_COMPILER_IS_GNUCC, which is set for gcc. > > AFAIK there is no CMAKE_COMPILER_IS_MSVC. > > There are CMAKE_C_COMPILER and CMAKE_GENERATOR_CC, which are probably > > set to "cl" both for

[CMake] Fwd: Add definitions question

2006-01-30 Thread Rupert Brooks
Hi, I have a source file which can be compiled into two possible executables depending on a compiler definition (Specifically, i get a 3D image processing executable if i set IMAGE_DIMENSION=3, and a 2D executable if IMAGE_DIMENSION=2) I'm having some problems getting this in CMAKE. ADD_DEFINITI

Re: [CMake] CMake and incrediBuild

2006-01-30 Thread Brad King
Sören Freudiger wrote: By using incrediBuild (for VS 2005) I always have to deactivate the compilation of the CMakeLists.txt file. Otherwise I get an access-violation error for the project file by incrediBuild. I think the problem is the renewing of the project file at compling CMakeLists.txt. So

[CMake] CMake and incrediBuild

2006-01-30 Thread Sören Freudiger
By using incrediBuild (for VS 2005) I always have to deactivate the compilation of the CMakeLists.txt file. Otherwise I get an access-violation error for the project file by incrediBuild. I think the problem is the renewing of the project file at compling CMakeLists.txt. So incrediBuild has access

Re: [CMake] Cannot bootstrap from CVS

2006-01-30 Thread Brad King
Richard Wackerbarth wrote: I thought that setting the CURSES_LIBRARY was the method by which "CMake will use ncurses" But, at least on this machine, ncurses has installed the header /usr/ local/include/ncurses.h rather than /usr/local/include/curses.h . Does this mean that the ncurses instal

Re: [CMake] 64bit installations, new X11 release

2006-01-30 Thread Brad King
Alexander Neundorf wrote: 1) there are several linux distributions coming with 64bit support now. AFAIK on these systems the directories /lib64, /usr/lib64 and /usr/local/lib64 exist additionally to the normal /lib, /usr/lib and /usr/local/lib directories. Is this already handled by cmake ? (AF

Re: [CMake] recommended way to test for msvc/cl ?

2006-01-30 Thread Brad King
Alexander Neundorf wrote: There is a variable CMAKE_COMPILER_IS_GNUCC, which is set for gcc. AFAIK there is no CMAKE_COMPILER_IS_MSVC. There are CMAKE_C_COMPILER and CMAKE_GENERATOR_CC, which are probably set to "cl" both for MSVC and nmake Makefiles ? So which test is recommended ? We'v

Re: [CMake] recommended way to disable a package ?

2006-01-30 Thread Filipe Sousa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexander Neundorf wrote: > Hi, > > ... > > Ok, then I think I'll do > > OPTION(USE_AGG "AGG SUpport" ON) > IF( USE_AGG) >FIND_PACKAGE(AGG) > ENDIF( USE_AGG) > > > and later on use AGG_FOUND just as usual. This could even be wrappe

Re: [CMake] project name

2006-01-30 Thread Gaetan Lehmann
On Mon, 30 Jan 2006 11:26:48 +0100, Filipe Sousa <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gaetan Lehmann wrote: Hi, Is there a var where the project name is stored ? ${PROJECT_NAME} Thank you :-) I think it should appear somewhere in the doc http://cmak

Re: [CMake] project name

2006-01-30 Thread Filipe Sousa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gaetan Lehmann wrote: > Hi, > > Is there a var where the project name is stored ? ${PROJECT_NAME} > When I call > >PROJECT(myProject) > > I want to be able to get the name "myProject" elsewhere in my cmake script. > > Thanks, > > Gaetan >

[CMake] project name

2006-01-30 Thread Gaetan Lehmann
Hi, Is there a var where the project name is stored ? When I call PROJECT(myProject) I want to be able to get the name "myProject" elsewhere in my cmake script. Thanks, Gaetan -- Gaëtan Lehmann Biologie du Développement et de la Reproduction INRA de Jouy-en-Josas (France) tel: +33 1 34 65

Re: [CMake] recommended way to test for msvc/cl ?

2006-01-30 Thread Jan Woetzel
Alexander Neundorf wrote: what's the recommended way to test in a CMakeLists.txt, whether the current compiler is msvc/cl ? You can test for msvc "projects/solution" (in contrast to Win32 nmake makefiles) by: IF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)") Jan. -- Dipl.-Ing. Jan Woet