[cmake-developers] Merge IAR compiler support?

2013-03-23 Thread Bjørn Forsman
Hi,

I'd like to get IAR compiler support merged in CMake. There is already
a pretty long bug/ticket for this here:

http://public.kitware.com/Bug/view.php?id=10176

I've successfully tested IAR ARM compiler with CMake from the
AddIARSupport branch[1] on github. I tested it with MinGW and MSYS
generators. (I have not tested the IAR AVR compiler.)

What is missing for this (awesome!) feature to be merged?

Best regards,
Bjørn Forsman

[1] https://github.com/neundorf/CMake/tree/AddIARSupport
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] Merge IAR compiler support?

2013-03-23 Thread Alexander Neundorf
On Saturday 23 March 2013, Bjørn Forsman wrote:
 Hi,
 
 I'd like to get IAR compiler support merged in CMake. There is already
 a pretty long bug/ticket for this here:
 
 http://public.kitware.com/Bug/view.php?id=10176
 
 I've successfully tested IAR ARM compiler with CMake from the
 AddIARSupport branch[1] on github. I tested it with MinGW and MSYS
 generators. (I have not tested the IAR AVR compiler.)
 
 What is missing for this (awesome!) feature to be merged?


For 2.8.11 I put work into the Texas Instruments compiler, for 2.8.12 I'll see 
to get the IAR compiler in (with your help).

Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] Merge IAR compiler support?

2013-03-23 Thread Bjørn Forsman
On 23 March 2013 17:18, Alexander Neundorf neund...@kde.org wrote:
[...]
 For 2.8.11 I put work into the Texas Instruments compiler, for 2.8.12 I'll see
 to get the IAR compiler in (with your help).

Sounds great!

Best regards,
Bjørn Forsman
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] if (FOO == BAR) ...

2013-03-23 Thread David Cole
Wow, could be a variable on the right, too. So my previous example was 
still not 100% safe.


Maybe this construct is 100% safe:

   set(x ${some_var_that_may_eval_to_another_var_name})
   set(y some string constant that may also accidentally be a var)
   if(x STREQUAL y)

You can see why the x${var} STREQUAL xSomeString approach is 
appealing after a discussion like this. Probably safe enough when 
variable names might accidentally be involved in a strings intended 
STREQUAL comparison.



D


-Original Message-
From: Alexander Neundorf neund...@kde.org
To: cmake-developers cmake-developers@cmake.org
Sent: Sat, Mar 23, 2013 10:21 am
Subject: Re: [cmake-developers] if (FOO == BAR) ...


On Thursday 21 March 2013, Matthew Woehlke wrote:

On 2013-03-21 16:55, David Cole wrote:
 I almost always do one of these for string compare to a CMake 

variable


 value:
  if(${var} STREQUAL some string constant)
  if(${var} STREQUAL ${some_other_variable})

 However, this is only because I am almost always certain that ${var}
 does not evaluate to the name of yet another CMake variable.
 If it did, I would get unintended results.

 So I wouldn't say it's necessarily a best-practice. It's close 

enough
 for many lines of code I've written, but a monkey-wrench could 

easily

 be thrown at it.

 Does forcing the if(VARIABLE usage rather than the if(string usage
 make things work all the time? (Now I've thought about it too hard,
 and I can't remember if this works all the time or not...)

  set(x ${var})
  if(x STREQUAL some string constant)

I think this would be the only way to be 100% safe.


I think the right side also needs to be a variable, there might be a 
variable

named some string constant (ok, usually there isn't).

Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html


Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ


Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

 
--


Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers