Anonymous | Login | 2022-05-23 17:48 UTC | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000528 | OMNeT++ | IDE / other | public | 2012-01-20 09:54 | 2017-03-02 16:00 | ||||
Reporter | michael | ||||||||
Assigned To | rhornig | ||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 4.2.1 | ||||||||
Target Version | Fixed in Version | 5.1 | |||||||
Summary | 0000528: Please use -isystem instead of -I as include flag for common or system includes | ||||||||
Description | It would be nice if the Makefile variable: # C++ include paths (with -I) INCLUDE_PATH = -I/tools/boost/include/boost-1_49 -I. could be changed into # C++ include paths (with -I) INCLUDE_PATH = -isystem /tools/boost/include/boost-1_49 -I. which means all additional include pathes from C/C++ should use -isystem, which prevents gcc to reports warnings found there. The same for: COPTS = $(CFLAGS) $(INCLUDE_PATH) -I$(OMNETPP_INCL_DIR) which should be: COPTS = $(CFLAGS) $(INCLUDE_PATH) -isystem $(OMNETPP_INCL_DIR) Currently I use this workaround in makefraq: COPTS := $(subst -isystem .,-I.,$(subst -I,-isystem ,$(COPTS))) which you can use to prevent corrections for the msg-file tool. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
![]() |
|
(0000699) michael (reporter) 2012-01-20 12:28 |
Following code can be used after makefraq include to replace -I includes which does not belong to current project (it also replaces -I's for referenced projects), for the window case it is a little bit complicated ;): # use -isystem instead of -I flag, to hide warnings in these files RELPRJDOTS = $(subst o,,$(subst o ,/,$(patsubst %,..o,$(subst /, ,$(PROJECTRELATIVE_PATH))))) ifneq (,$(findstring MINGW,$(shell uname -s))) # on windows we need this hack for pathes like -Id:/... override COPTS := $(shell echo '$(subst -I$(RELPRJDOTS)/.,-isystem $(RELPRJDOTS)/.,$(COPTS))' |sed -e 's/-I\($(subst \| ,\|,$(addsuffix \|,$(filter %:,$(subst :,: ,$(patsubst -I%,%,$(COPTS))))) \/)\)/-isystem \1/g') else # on unix we can use this override COPTS := $(subst -I/,-isystem /,$(subst -I$(RELPRJDOTS)/.,-isystem $(RELPRJDOTS)/.,$(COPTS))) endif $(info Replaced COPTS -I directives with -isystem directive: $(COPTS)) |
(0001341) rhornig (administrator) 2017-03-02 16:00 |
omnetpp.h is now marked as a system header so this is no longer needed. Still you can add a -isystem and specify a folder and it will take precedence over the -I flag. |
![]() |
|||
Date Modified | Username | Field | Change |
2012-01-20 09:54 | michael | New Issue | |
2012-01-20 12:28 | michael | Note Added: 0000699 | |
2017-03-02 16:00 | rhornig | Note Added: 0001341 | |
2017-03-02 16:00 | rhornig | Status | new => resolved |
2017-03-02 16:00 | rhornig | Fixed in Version | => 5.1 |
2017-03-02 16:00 | rhornig | Resolution | open => fixed |
2017-03-02 16:00 | rhornig | Assigned To | => rhornig |
Copyright © 2000 - 2022 MantisBT Team |