-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add space between -I and path for CPPFLAGS #1474
Conversation
In order for the Eclipse CDT GCC Build Output Parser to be able to pick up the include paths for C++/cpp files a space is required between the compiler option (-I) and the actual path.
make/component_wrapper.mk
Outdated
@@ -244,12 +244,12 @@ $(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.c $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | |||
|
|||
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cpp $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS) | |||
$$(summary) CXX $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@ | |||
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@ | |||
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are another two -I
flags in this line (and the second one), should they be updated as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The part that is responsible for C has already been correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just reviewed my changes and it seems as if I've missed to places
Thanks for submitting this, @roamingthings! Do you have a reference why this is only needed for C++ files but not for C? |
In order for the Eclipse CDT GCC Build Output Parser to be able to pick up the include paths for C++/cpp files a space is required between the compiler option (-I) and the actual path.
The part that is responsible for C has already been correct. |
Thanks @roamingthings . I've squashed these two commits and cherry-picked into our internal merge queue. |
In order for the Eclipse CDT GCC Build Output Parser to be able to pick up the include paths for C++/cpp files a space is required between the compiler option (-I) and the actual path. Merges #1474
Thanks again @roamingthings . Cherry-picked in 77adf85, and @igrr noticed the component directory also may need a space so this was added in 3f5d6cf. |
In order for the Eclipse CDT GCC Build Output Parser to be able to
pick up the include paths for C++/cpp files a space is required
between the compiler option (-I) and the actual path.