-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
lib: include files using known path #16991
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
Conversation
e9c287c
to
6d6df5f
Compare
e459dbc
to
6c53a56
Compare
@vszakats @icing what do you think about this? This PR makes it a little clearer where include files come from and it reduces the risk of problems with external files having the same names (see #16949) but it adds quite a few Personally I think I lean towards this being a small improvement |
Analysis of PR #16991 at 6c53a560: Test 3023 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Generated by Testclutch |
The issue this sprung from seems theoretical or artifical even, but, Suggestion to sync-up this change with cmake builds: --- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -36,10 +36,7 @@ list(APPEND HHEADERS "${CMAKE_CURRENT_BINARY_DIR}/curl_config.h")
# The rest of the build
-include_directories(
- "${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
- "${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h"
-)
+include_directories("${PROJECT_BINARY_DIR}/lib") # for "curl_config.h"
if(USE_ARES)
include_directories(SYSTEM ${CARES_INCLUDE_DIRS})
endif() |
by including headers using "../[header]" when done from C files in subdirectories, we do not need to specify the lib source dir as an include path and we reduce the risk of header name collisions with headers in the SDK using the same file names. Ref: #16949
6c53a56
to
a6899ee
Compare
I like it. It's more clear. |
by including headers using "../[header]" when done from C files in subdirectories, we do not need to specify the lib source dir as an include path and we reduce the risk of header name collisions with headers in the SDK using the same file names. Idea-by: Kai Pastor Ref: curl#16949 Closes curl#16991
by including headers using "../[header]" when done from C files in subdirectories, we do not need to specify the lib source dir as an include path and we reduce the risk of header name collisions with headers in the SDK using the same file names.
Ref: #16949