CMake: respect LDFLAGS from environment during build

Merge pull request #2113 from hamarituc/ldflags
This commit is contained in:
Adriaan de Groot 2023-03-21 11:46:58 +01:00 committed by GitHub
commit 74d30afad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,7 +216,7 @@ set(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG") set(CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined -Wl,--fatal-warnings") set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined -Wl,--fatal-warnings ${CMAKE_SHARED_LINKER_FLAGS}")
# If no build type is set, pick a reasonable one # If no build type is set, pick a reasonable one
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)