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 Woetzel

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 - -- Filipe

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

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 think the

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't actually

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] 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] 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 ? ${PROJECT_NAME}