Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332450 - Folder-Specific properties are not applied
Summary: Folder-Specific properties are not applied
Status: CLOSED INVALID
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 trivial (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Recoskie CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-13 11:08 EST by r.berg CLA
Modified: 2011-01-27 12:57 EST (History)
2 users (show)

See Also:


Attachments
Screenshot (260.36 KB, image/jpeg)
2010-12-13 11:18 EST, r.berg CLA
no flags Details
Generated .mk folder makefile (962 bytes, application/octet-stream)
2010-12-13 12:44 EST, r.berg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description r.berg CLA 2010-12-13 11:08:58 EST
Build Identifier: 

In my projects toplevel folder I enabled warnings (-pedantic, -pedantic-errors, -wall, -werror). In a subfolder (containing code generated by gsoap that throws warnings) I disabled all warnings.

The compiler still uses the warnings for all files in all subfolders. The only chance I have to get the stuff compiled is disabling all warnings for the WHOLE project. it is not possible to disable warnings for the subfolder.

(And somehow I have the feeling that this worked throughout the whole day but no doesn't work anymore.)

Note: I did NOT accidentially modify an inactive build target. I modified ALL build targets.

Note: When I only compile one single file in the folder, the correct settings (no warnings) are applied for this file. Only when I compile everything, the wrong settings (settings of the toplevel folder with warnings) are applied.


Reproducible: Always

Steps to Reproduce:
1. Create a managed hello world project
2. Enable warnings (-pedantic, -pedantic-errors, -wall, -werror)
3. Create a folder, create a class, create a method "op", call th method "op" from main.
4. In the new folder disable all warnings - on folder level.
5. In the method "op" enforce a warning. (In my case:
if(something)
   if(something else)
       blabla
   else
       blabla
6. Compile only the single file in the folder. This is successful because no warnings (and no warning as error) is applied.
7. Compile everything: The file in the foder is compiled with warnings enabled.

(I double-checked this. At least on my system the behavior is this way. However, I have the feeling - as I said - that this morning everything was ok. Restarting eclipse, pressing F5 etc. did not work out.)

Thank you,
Roelof Berg

(I have a screenshot as an evidence/proof - in case you can't believe this :)
Comment 1 r.berg CLA 2010-12-13 11:18:19 EST
Created attachment 185077 [details]
Screenshot

Screenshot of the behavior I don't expect.

You see the build-cmd-line of the folder above. Below you see the last build-shell. In the build-shell one can see different g++-cmdline-options than one sees in the folder-properties-dialog above.
Comment 2 r.berg CLA 2010-12-13 12:44:10 EST
Created attachment 185081 [details]
Generated .mk folder makefile

Generated makefile looks ok.

But in the eclipse command line output I see -pedantig again (allthough this option is NOT in the generated makefile):

Building file: ../src/generated_code/soap/soapC.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -pedantic -pedantic-errors -Wall -Werror -c -fmessage-length=0 -MMD -MP -MF"src/generated_code/soap/soapC.d" -MT"src/generated_code/soap/soapC.d" -o"src/generated_code/soap/soapC.o" "../src/generated_code/soap/soapC.cpp"
cc1plus: warnings being treated as errors
../src/generated_code/soap/soapC.cpp: In function ‘std::string* soap_in_std__string(soap*, const char*, std::string*, const char*)’:
../src/generated_code/soap/soapC.cpp:616: error: suggest explicit braces to avoid ambiguous ‘else’

As if the makefile would not be applied.

Could this be related to the ".." in the filepath ? (However, I wonder where the ".." comes from ...)
Comment 3 r.berg CLA 2011-01-27 12:57:33 EST
==============================
Status-Request: Closed/Invalid
==============================

Hi,

I still wonder about my posted screenshot.

However, I #included generated code (from the folder with warnings DISabled) to handwritten-code (that folder has warnings ENabled). So what happens: When compiling the handwritten-code-files, the generated-code is included and also compiled "pedantic-as-error". So I shouldn't wonder about compile-errors then, right :)

Ok, besides the fact that I still wonder about the attached screenshot, chances are very good that there's no bug. (Just user stupidity ;)

Sorry, I hope no one wasted effort for bug hunting,
Roelof