Re: [CMake] cmake config.h

2010-11-27 Thread Clifford Yapp
To the best of my knowledge, there is no automatic feature available in CMake for this. Fortunately, it is not terribly hard to set up something reasonably functional yourself with a few Macros - autoheader uses some fairly standard naming conventions. For BRL-CAD I've wrapped the key tests in

Re: [CMake] cmake config.h

2010-11-27 Thread Michael Jackson
You use a combination of some CMake macros and configure_file() command. First, in your CMakeLists.txt file (or another cmake file) you would have lines such as: # In this file we are doing all of our 'configure' checks. Things like checking # for headers, functions, libraries, types and size

[CMake] newline: for all platforms

2010-11-27 Thread Hicham Mouline
Hi, Is there a variable that holds the proper newline for the current platform? \n for unix linux mac \n\r for windows I need a cmake variable that will hold #include header1.hpp #include header1.hpp ... #include headern.hpp and that will be replaced by configure_file to

[CMake] How to apply the --as-needed linker flag?

2010-11-27 Thread Alan W. Irwin
I just discovered that many Linux distros these days use the --as-needed Linux linker option by default. At first glance that option makes a lot of sense since it tends to reduce startup times. But I guess there are some caveats as well which is probably why CMake does not adopt this linker

[CMake] autoconfTocmake transfer glitch

2010-11-27 Thread luxInteg
Greetings, I am learning cmake. I am attempting to compile a small progrmm libxls (available from http://libxls.sourceforge.net/ ) as part of my education. It compiles with autoconf/make like so:- ## from sh configure checking for GNU libc compatible malloc... yes checking

Re: [CMake] cmake config.h

2010-11-27 Thread luxInteg
On Saturday 27 November 2010 14:58:15 Michael Jackson wrote: You use a combination of some CMake macros and configure_file() command. First, in your CMakeLists.txt file (or another cmake file) you would have lines such as: # In this file we are doing all of our 'configure' checks. Things

Re: [CMake] cmake config.h

2010-11-27 Thread luxInteg
On Saturday 27 November 2010 14:24:01 Clifford Yapp wrote: To the best of my knowledge, there is no automatic feature available in CMake for this. Fortunately, it is not terribly hard to set up something reasonably functional yourself with a few Macros - autoheader uses some fairly standard

Re: [CMake] autoconfTocmake transfer glitch

2010-11-27 Thread luxInteg
On Sunday 28 November 2010 02:22:56 luxInteg wrote: Greetings, I am learning cmake. I am attempting to compile a small progrmm libxls (available from http://libxls.sourceforge.net/ ) as part of my education. It compiles with autoconf/make like so:- ## from sh

Re: [CMake] newline: for all platforms

2010-11-27 Thread Ryan Pavlik
In most cases, \n works everywhere for compilation - you just can't use windows notepad to edit files like that. Since only Windows (well, and pre-OS X mac) uses something other than \n as far as I know, you could also just do if(WIN32) and set it yourself if it really does matter in your

Re: [CMake] How to apply the --as-needed linker flag?

2010-11-27 Thread Michael Hertling
On 11/27/2010 06:45 PM, Alan W. Irwin wrote: I just discovered that many Linux distros these days use the --as-needed Linux linker option by default. At first glance that option makes a lot of sense since it tends to reduce startup times. But I guess there are some caveats as well which is