Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-03 Thread Nils Gladitz
On 09/04/2014 08:00 AM, Chuck Atkins wrote: > But is there a way to check if the value of the variable a equals to "b" or "c"? Directly: if(a STREQUAL "b" OR a STREQUAL "c") b is dereferenced as a variable even if it is quoted. Nils -- Powered by www.kitware.com Please keep messages on-top

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-03 Thread Chuck Atkins
> But is there a way to check if the value of the variable a equals to "b" or "c"? Directly: if(a STREQUAL "b" OR a STREQUAL "c") But its a bit clumsy. Better would be to match a regex: if(a MATCHES "^(b|c)$") -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-03 Thread Clark Wang
On Thu, Sep 4, 2014 at 1:44 PM, Clark Wang wrote: > On Thu, Sep 4, 2014 at 1:36 PM, Chuck Atkins > wrote: > >> Hi Clark >> >> The expression inside the if statement has it's variables dereferenced >> before evaluating and the non-variables are treated as constant >> expressions. In this case, a

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-03 Thread Clark Wang
On Thu, Sep 4, 2014 at 1:36 PM, Chuck Atkins wrote: > Hi Clark > > The expression inside the if statement has it's variables dereferenced > before evaluating and the non-variables are treated as constant > expressions. In this case, a resolves to "b", b resolves to "c", and c is > not a variable

Re: [CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-03 Thread Chuck Atkins
Hi Clark The expression inside the if statement has it's variables dereferenced before evaluating and the non-variables are treated as constant expressions. In this case, a resolves to "b", b resolves to "c", and c is not a variable so it's treated as the constant expression "c". Thus if(a STRE

[CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

2014-09-03 Thread Clark Wang
Hi, I don't understand why the following code would not print "true" (tested with cmake-3.0): set(a b) set(b c) if(a STREQUAL b OR a STREQUAL c) message("true") endif() >From my understanding, no matter how magic the if command interprets its arguments, one of the expressions (a STRE

[CMake] Visual Studio 2013 warning MSB8028

2014-09-03 Thread Saad Khattak
I have a solution with multiple projects including a CMake INSTALL project for installing the binaries. With CMake Version 3.0 I am receiving the following warning for each of my projects in the solution: "warning MSB8028: The intermediate directory (myProject.dir\Debug\) contains files shared from

[CMake] Problem creating a Platform with Unix Makefiles (on windows)

2014-09-03 Thread fungos
Hello, I'm trying to create a new platform (closed for game dev) and I got it working with Ninja generator, but when I try to use Unix Makefiles generator it will give the output at and of the email. Yup, Unix Makefiles on Windows, that is correct and it works if I use toolchain overrides in the C

[CMake] Ctest building with Multiple Processors

2014-09-03 Thread Michael Jackson
I am exploring CTest/CDash with out project and I was trying to figure out how to have CTest use all my cores for builds. So far no luck with some snippets from Google. So far I have the following in a file called CTestConfig.cmake at the top level of my project. set(CTEST_PROJECT_NAME "DREAM3

[CMake] how to define global compiler flags that are inserted before user-defined flags?

2014-09-03 Thread René J . V . Bertin
I was referred here from http://public.kitware.com/Bug/view.php?id=15127 ... so here goes: KDE defines a number of compiler options that are (supposedly) required but that include optimisation options. These settings are defined in system-wide .cmake files like FindKDE4Internal.cmake and get ap

[CMake] Remove Source Suffix from Object

2014-09-03 Thread Yanbo Zhu (yanbzhu)
Environment: Centos 64bit Question is: Currently, the makefiles generated by cmake generate object files that contains the source suffix (.c, .cpp), for example do_stuff.c gets compiled to do_stuff.c.o. How do I change it so that cmake generates makefiles that generates do_stuff.o (without the

[CMake] includes_Fortran.rsp not used

2014-09-03 Thread Karsten Bolding
Hello I'm trying to cross-compile a Fortran program using mingw32-w64 on Linux. I need to link to NetCDF and during the cmake process the following file is generated: CMakeFiles/output.dir/includes_Fortran.rsp with the following content: -I/home/kb/build/gotm/i686-w64-mingw32-gfortran -I/home/kb/