Repository navigation
Conversation
Otherwise paths ends up as -L"/usr/local" instead of -L/usr/local
|
Are you sure the quotes weren't added there (in 558814e) to make these options work on Windows, where GSS may be detected on path with spaces? Are the quotes breaking something? |
|
It's at least inconsistent with GNU Autotools but I guess you could add it specificly for Windows |
autotools doesn't support MSVC, and missed the Windows-specific detection. What about avoiding the manual flag creation altogether?: --- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1200,10 +1200,6 @@ if(CURL_USE_GSSAPI)
string(REPLACE ";" " " GSS_CFLAGS "${GSS_CFLAGS}")
string(REPLACE ";" " " GSS_LDFLAGS "${GSS_LDFLAGS}")
- foreach(_dir IN LISTS GSS_LIBRARY_DIRS)
- set(GSS_LDFLAGS "${GSS_LDFLAGS} -L\"${_dir}\"")
- endforeach()
-
if(NOT GSS_FLAVOUR STREQUAL "GNU")
set(_include_list "")
check_include_file("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
@@ -1222,7 +1218,10 @@ if(CURL_USE_GSSAPI)
endif()
if(NOT DEFINED HAVE_GSS_C_NT_HOSTBASED_SERVICE)
- set(CMAKE_REQUIRED_FLAGS "${GSS_CFLAGS} ${GSS_LDFLAGS}")
+ foreach(_dir IN LISTS GSS_LIBRARY_DIRS)
+ curl_required_libpaths(${_dir})
+ endforeach()
+ set(CMAKE_REQUIRED_FLAGS ${GSS_CFLAGS})
set(CMAKE_REQUIRED_LIBRARIES ${GSS_LIBRARIES})
check_symbol_exists("GSS_C_NT_HOSTBASED_SERVICE" "${_include_list}" HAVE_GSS_C_NT_HOSTBASED_SERVICE)
endif()
@@ -1237,8 +1236,6 @@ if(CURL_USE_GSSAPI)
include_directories(SYSTEM ${GSS_INCLUDE_DIRS})
link_directories(${GSS_LIBRARY_DIRS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_CFLAGS}")
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GSS_LDFLAGS}")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GSS_LDFLAGS}")
list(APPEND CURL_LIBS ${GSS_LIBRARIES})
if(GSS_FLAVOUR STREQUAL "GNU")
set(HAVE_GSSGNU 1)
|
- drop `CMAKE_SHARED_LINKER_FLAGS` and `CMAKE_EXE_LINKER_FLAGS` that seem redundant over `link_directories()` - add libpaths to `CURL_LIBPATHS`. - use `curl_required_libpaths()` to pass the libpaths to the feature test. Fixes curl#15536
|
Proposing #15545 to tidy up this and some more. |
|
I guess that's fine, can't test it until the weekend though |
- drop `CMAKE_SHARED_LINKER_FLAGS` and `CMAKE_EXE_LINKER_FLAGS` that seem redundant over `link_directories()` - add libpaths to `CURL_LIBPATHS`. - use `curl_required_libpaths()` to pass the libpaths to the feature test. Fixes curl#15536
|
@vszakats |
|
The next release is scheduled for Dec. 11. https://curl.se/dev/release-procedure.html
|
|
@diizzyy Yes, there is, it's scheduled for Dec. 11. |
|
Ahh ok, I was under the impression it would be sooner for a bugfix release |
- stop passing explicit libpaths via `CMAKE_SHARED_LINKER_FLAGS` and `CMAKE_EXE_LINKER_FLAGS`. `link_directories()` is doing that already. - use `curl_required_libpaths()` to pass libpaths to the feature test. Reported-by: Daniel Engberg Fixes curl#15536 Also fixes GSS feature detection with non-gcc/clang compilers, such as MSVC. - add libpaths to `CURL_LIBPATHS`. - move `GSS_CFLAGS`, `GSS_LDFLAGS` stringifications to FindGSS. To match the `CFLAGS` format returned by the rest of Find modules. - reorder calls to match other dependencies. - don't extend system `LDFLAGS` when FindGSS did not return any. - ignore `LDFLAGS` when detecting GSS via `pkg-config`. `LDFLAGS` holds a copy of libpaths and libs in this case. Ignore those to avoid these duplicates making into `libcurl.pc` and `curl-config`. Also syncing behavior with other Find modules which also ignore raw `LDFLAGS`. - ignore raw `LDFLAGS` coming from `krb5-config --libs`. FindGSS no longer returns dependency-specific `LDFLAGS` after this. Syncing behavior with other Find modules. - reduce scope of checker state push/pop/set. Closes curl#15545
Otherwise paths ends up as -L"/usr/local" instead of -L/usr/local