Brad King wrote:

> On 08/10/2012 04:53 AM, Stephen Kelly wrote:
>> I've merged a branch into next to ensure that compiler definitions are
>> only added one time on the command line.
> 
> The "Preprocessor" test already has extensive coverage of
> COMPILE_DEFINITIONS. Can that test be extended for your cases instead of
> adding a new test?

Possibly. 

>From a quick look at that test I'm not sure if you're asking for something 
like git mv Tests/CompileDefinitions/* Tests/Preprocess and then modifying 
Tests/Preprocess/CMakeLists.txt to match, or do you mean something more 
'flat' where I would simply add more duplication of the compile definitions 
in Tests/Preprocess/CMakeLists.txt. 

The point of doing it in a separate test was to be more clearly able to see 
the duplication without it getting lost in a different test, and to be able 
to see which one sets which definition first (add_defintions or 
set_property(COMPILE_DEFINITONS)) to test that neither overwrites the other.

> 
> Also I think the test for uniqueness is better done in the original form
> using a local std::set<> to know whether each definition has been added.
> Searching for existing strings in the output is not robust.

I agree. I wanted to avoid changing the API to start the discussion, but 
this is the kind of feedback I was looking for. 

Many generators have to be touched to fix the API, but it should be do-able.

Thanks,

Steve.


--

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

Reply via email to