Re: [CMake] Explanation....

2014-04-28 Thread Johannes Zarl
On Thursday, 24. April 2014, 17:34:40, Matthew Woehlke wrote: On 2014-04-24 04:53, Johannes Zarl wrote: On Wednesday, 23. April 2014, 18:54:39, Matthew Woehlke wrote: if ( ${arg} STREQUAL TOTO) set( TOTO evil) You sure? When I checked, this did not work. Are *you* sure? :-)

Re: [CMake] Explanation....

2014-04-28 Thread David Cole
I'm always happy to learn something new. How would you manage to make the following if statement trigger? set( arg value) if ( ${arg} STREQUAL TOTO ) message ( arg equals 'TOTO', and arg equals 'value' ) endif() By having a variable named value that you didn't know about... This

Re: [CMake] Explanation....

2014-04-28 Thread Matthew Woehlke
On 2014-04-28 04:58, Johannes Zarl wrote: I'm always happy to learn something new. How would you manage to make the following if statement trigger? set( arg value) if ( ${arg} STREQUAL TOTO ) message ( arg equals 'TOTO', and arg equals 'value' ) endif() Exactly how you would expect: set(

Re: [CMake] Explanation....

2014-04-25 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/24/2014 12:31 PM, David Cole wrote: You sure? When I checked, this did not work. Also, the following gives me a syntax error: I, for one, would fully support breaking backwards compatibility to fix this, and be strict with variable and

Re: [CMake] Explanation....

2014-04-24 Thread Johannes Zarl
On Wednesday, 23. April 2014, 18:54:39, Matthew Woehlke wrote: if ( ${arg} STREQUAL TOTO) set( TOTO evil) You sure? When I checked, this did not work. Also, the following gives me a syntax error: set ( foo Evil!) message( ${ foo}) Syntax error in cmake code at

Re: [CMake] Explanation....

2014-04-24 Thread David Cole
You sure? When I checked, this did not work. Also, the following gives me a syntax error: set ( foo Evil!) message( ${ foo}) But you *can* still do it indirectly (even with the 3.0 RCs): set ( variable with spaces Evil too!) set (varname variable with spaces)

Re: [CMake] Explanation....

2014-04-24 Thread Matthew Woehlke
On 2014-04-24 04:53, Johannes Zarl wrote: On Wednesday, 23. April 2014, 18:54:39, Matthew Woehlke wrote: if ( ${arg} STREQUAL TOTO) set( TOTO evil) You sure? When I checked, this did not work. Are *you* sure? :-) Also, the following gives me a syntax error: message( ${ foo}) Right;

Re: [CMake] Explanation....

2014-04-23 Thread Matthew Woehlke
On 2014-04-16 06:03, Rolf Eike Beer wrote: Am 16.04.2014 11:39, schrieb Johannes Zarl: Instead of ``${var} STREQUAL VALUE'', write: IF ( var MATCHES ^VALUE$ ) NO, please don't! I try hard to kill all those as it requires compiling a regular expression for a simple string match. Just

Re: [CMake] Explanation....

2014-04-16 Thread Johannes Zarl
Hi, On Monday, 14. April 2014, 19:23:19, Theodore Papadopoulo wrote: if (${arg} STREQUAL TOTO) - if (TOTO STREQUAL TOTO) - if (B STREQUAL B) What I do not follow is why there is an implicit evaluation of TOTO into B (in both this case or the next I explicitely asked for a string

Re: [CMake] Explanation....

2014-04-16 Thread Rolf Eike Beer
Am 16.04.2014 11:39, schrieb Johannes Zarl: Hi, On Monday, 14. April 2014, 19:23:19, Theodore Papadopoulo wrote: if (${arg} STREQUAL TOTO) - if (TOTO STREQUAL TOTO) - if (B STREQUAL B) What I do not follow is why there is an implicit evaluation of TOTO into B (in both this case or the next

Re: [CMake] Explanation....

2014-04-16 Thread Johannes Zarl
On Wednesday, 16. April 2014, 12:03:30, Rolf Eike Beer wrote: Instead of ``${var} STREQUAL VALUE'', write: IF ( var MATCHES ^VALUE$ ) NO, please don't! I try hard to kill all those as it requires compiling a regular expression for a simple string match. Just change it to something

Re: [CMake] Explanation....

2014-04-14 Thread Johannes Zarl
Hello Theo, On Friday, 11. April 2014, 14:20:36, Theodore Papadopoulo wrote: ::-B-:: - This shows that B is indeed parsed as OPTIONAL A A- Fine I'm in the else part of the if OPTIONAL HERE - Fine. ... I guess OPTIONAL should read TOTO. You say it's fine, but it's probably

Re: [CMake] Explanation....

2014-04-14 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 First thank's a lot for your answer On 04/14/2014 12:03 PM, Johannes Zarl wrote: Hello Theo, On Friday, 11. April 2014, 14:20:36, Theodore Papadopoulo wrote: ::-B-:: - This shows that B is indeed parsed as OPTIONAL A A- Fine I'm in

[CMake] Explanation....

2014-04-11 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have run on behaviour of cmake that I really do not understand (even if I have clues)... This is probably stupid, but I'm puzzled... The attached CMakeLists.txt gives the following output: ::-B-:: - This shows that B is indeed parsed as OPTIONAL

Re: [CMake] Explanation of the CMake INSTALL and EXPORT Commands

2013-04-04 Thread Saad Khattak
will follow your advice here and split up the configurations. Thank you, Saad Message: 2 Date: Wed, 03 Apr 2013 17:12:43 -0400 From: Matthew Woehlke matthew.woeh...@kitware.com Subject: Re: [CMake] Explanation of the CMake INSTALL and EXPORT Commands To: cmake@cmake.org Message-ID: kji607

[CMake] Explanation of the CMake INSTALL and EXPORT Commands

2013-04-03 Thread Saad Khattak
Hi, I am having a hard time understanding some commands in CMake which by the looks of it are vital for proper project deployment. One of the commands is INSTALL and the other is EXPORT. I have read the following page many times: http://www.cmake.org/Wiki/CMake:Install_Commands. The article

Re: [CMake] Explanation of the CMake INSTALL and EXPORT Commands

2013-04-03 Thread Matthew Woehlke
On 2013-04-03 16:16, Saad Khattak wrote: I am having a hard time understanding some commands in CMake which by the looks of it are vital for proper project deployment. One of the commands is INSTALL and the other is EXPORT. There are two forms of EXPORT, and I am not certain which one you are