mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
cmake: Set GNU compiler flags also for clang.
This commit is contained in:
@@ -7,7 +7,8 @@ if (UNIX AND NOT WIN32)
|
|||||||
#
|
#
|
||||||
# Define GNUCC compiler flags
|
# Define GNUCC compiler flags
|
||||||
#
|
#
|
||||||
if (${CMAKE_C_COMPILER_ID} MATCHES GNU)
|
if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
|
||||||
|
|
||||||
# add -Wconversion ?
|
# add -Wconversion ?
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement")
|
||||||
@@ -29,7 +30,7 @@ if (UNIX AND NOT WIN32)
|
|||||||
if (WITH_FORTIFY_SOURCE)
|
if (WITH_FORTIFY_SOURCE)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
|
||||||
endif (WITH_FORTIFY_SOURCE)
|
endif (WITH_FORTIFY_SOURCE)
|
||||||
endif (${CMAKE_C_COMPILER_ID} MATCHES GNU)
|
endif (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for large filesystem support
|
# Check for large filesystem support
|
||||||
|
Reference in New Issue
Block a user