Re: [CMake] Need to prepend compiler with static analysis tool

2012-05-24 Thread Bill Hoffman

On 5/23/2012 5:55 PM, Oliver Smith wrote:

On 5/23/2012 4:45 PM, jrosensw wrote:

Hi Alexander,

I tried this already. However I'm not sure what a clean build tree
means. Maybe thats my problems. All I did was this:

CXX=path/insurepath/g++ cmake .

But when I compiled I did not see a change. How do I get my tree to a
clean state? Other than running make clean which I did do.


rm -rf CMakeCache* CMakeFiles*

- Oliver



One other option is to use the link rule variables.

Something like this:

project (foo)

set (CMAKE_CXX_LINK_EXECUTABLE
/usr/bin/insure ${CMAKE_CXX_LINK_EXECUTABLE})
add_executable (foo foo.cxx)

-Bill

--

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://www.cmake.org/mailman/listinfo/cmake


[CMake] Need to prepend compiler with static analysis tool

2012-05-23 Thread jrosensw
Hey all,

   I'm trying to integrate insure++ with my cmake workspace.  The way insure
works is that you prepend the compiler with the insure executable.  For
example /usr/bin/insure /usr/bin/g++ -o test test.cpp.  I've tried to
overrid CMAKE_CXX_COMPILER with these two executables, but it doesn't seem
like CMAKE likes this way.  I've also tried overriding CXX before running
cmake with this.  

   Can someone please tell me how to make this work?  Seems like it should
be simple enough, but I'm not finding the answer :-).

Thanks!

-JD

--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Need-to-prepend-compiler-with-static-analysis-tool-tp7574176.html
Sent from the CMake mailing list archive at Nabble.com.
--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Need to prepend compiler with static analysis tool

2012-05-23 Thread Alexander Neundorf
On Wednesday 23 May 2012, jrosensw wrote:
 Hey all,
 
I'm trying to integrate insure++ with my cmake workspace.  The way
 insure works is that you prepend the compiler with the insure executable. 
 For example /usr/bin/insure /usr/bin/g++ -o test test.cpp.  I've tried
 to overrid CMAKE_CXX_COMPILER with these two executables, but it doesn't
 seem like CMAKE likes this way.  I've also tried overriding CXX before
 running cmake with this.
 
Can someone please tell me how to make this work?  Seems like it should
 be simple enough, but I'm not finding the answer :-).

Something like the following shoduld work:
$ CXX=/usr/bin/insure /usr/bin/g++ cmake ..
(on a fresh build tree)

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Need to prepend compiler with static analysis tool

2012-05-23 Thread jrosensw
Hi Alexander,

   I tried this already.  However I'm not sure what a clean build tree
means.  Maybe thats my problems.  All I did was this:

CXX=path/insure path/g++ cmake .

   But when I compiled I did not see a change.  How do I get my tree to a
clean state?  Other than running make clean which I did do.

Thanks,

JD

--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Need-to-prepend-compiler-with-static-analysis-tool-tp7574176p7574208.html
Sent from the CMake mailing list archive at Nabble.com.
--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Need to prepend compiler with static analysis tool

2012-05-23 Thread Oliver Smith

On 5/23/2012 4:45 PM, jrosensw wrote:

Hi Alexander,

I tried this already.  However I'm not sure what a clean build tree
means.  Maybe thats my problems.  All I did was this:

CXX=path/insurepath/g++ cmake .

But when I compiled I did not see a change.  How do I get my tree to a
clean state?  Other than running make clean which I did do.


rm -rf CMakeCache* CMakeFiles*

- Oliver


--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Need to prepend compiler with static analysis tool

2012-05-23 Thread jrosensw
Thanks Oliver!

--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Need-to-prepend-compiler-with-static-analysis-tool-tp7574176p7574256.html
Sent from the CMake mailing list archive at Nabble.com.
--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Need to prepend compiler with static analysis tool

2012-05-23 Thread Eric Noulard
2012/5/23 Oliver Smith osm...@playnet.com:
 On 5/23/2012 4:45 PM, jrosensw wrote:

 Hi Alexander,

    I tried this already.  However I'm not sure what a clean build tree
 means.  Maybe thats my problems.  All I did was this:

 CXX=path/insurepath/g++ cmake .

    But when I compiled I did not see a change.  How do I get my tree to a
 clean state?  Other than running make clean which I did do.

 rm -rf CMakeCache* CMakeFiles*

and you should build out-of-source
http://www.cmake.org/Wiki/CMake_FAQ#What_is_an_.22out-of-source.22_build.3F

this makes the clean-up as easy as

rm -rf build-tree

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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://www.cmake.org/mailman/listinfo/cmake