On Mon, Mar 9, 2009 at 4:03 PM, Brad King <brad.k...@kitware.com> wrote:

> By "compiler switches" do you mean real compiler flags or just preprocessor
> symbol definitions?  The COMPILE_DEFINITIONS property is only for
> preprocessor symbols.

I actually don't know. I haven't dug that deep into the build system yet.

> This is probably the best way.  If one were writing CMakeLists.txt files
> by hand from scratch, this is how it should be done.  However, I suggest
> not making excessive use of per-source build properties because they
> do not perform very well in the VS IDE (this is not CMake, but the VS
> IDE implementation).  The definitions will work, but they cause the IDE
> to use a separate invocation of the compiler for every source file
> instead of sharing one invocation for many sources in a target, which
> leads to slower builds.

There are two distinct settings so in theory two compiler invocations
should be enough. I think that the current build system spawns a new
compiler process for every file (it is a custom thing based on Perl
and dmake) so this should not produce any additional penalty.

> Can you provide more detail about the purpose of these switches?  Why
> does every source file need one?

What I know thus far is that they have something to do with
exceptions. Some files are compiled with exception settings A and some
with settings B. It may very well be that either A or B is empty, but
as mentioned above I have not yet dived into it.
_______________________________________________
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

Reply via email to