cmake: Return back the DEFAULT_C_COMPILE_FLAGS

Accidentally removed in 1689b83d0f.

Reported in #185 by Peter Kästle

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
(cherry picked from commit 3058549bf7)
This commit is contained in:
Jakub Jelen
2023-04-14 16:58:13 +02:00
parent 8b3b041096
commit dd0aaec67e

View File

@@ -348,6 +348,9 @@ endif (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND)
# This gets built as a static library, if -DBUILD_SHARED_LIBS=OFF is passed to
# cmake.
add_library(ssh ${libssh_SRCS})
target_compile_options(ssh
PRIVATE
${DEFAULT_C_COMPILE_FLAGS})
if (CYGWIN)
target_compile_definitions(ssh PRIVATE _GNU_SOURCE)
endif ()
@@ -407,6 +410,9 @@ install(EXPORT libssh-config
if (BUILD_STATIC_LIB)
add_library(ssh-static STATIC ${libssh_SRCS})
target_compile_options(ssh-static
PRIVATE
${DEFAULT_C_COMPILE_FLAGS})
if (CYGWIN)
target_compile_definitions(ssh-static PRIVATE _GNU_SOURCE)
endif ()