Skip to content

Commit

Permalink
Simplify compiler flags, update chck
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudef committed Apr 30, 2017
1 parent 358898a commit 32dfed1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ include(GCCCompatibleCompilerOptions)

if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(ldflags -O1 --sort-common --as-needed -z,relro -z,now)
set(cflags -flto -fuse-linker-plugin)
endif ()

check_c_compiler_flag(-fstack-protector-strong has_fstack_protector_strong)
Expand All @@ -90,9 +89,7 @@ create_custom_compiler_flags(Upstream -g -O2 ${cflags})

add_compiler_warnings(-Wall -Wextra -Wno-variadic-macros -Wno-long-long -Wformat=2 -Winit-self -Wfloat-equal -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wno-nonnull-compare)

if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
add_compiler_warnings(-Wsuggest-attribute=pure -Wsuggest-attribute=const)
elseif (CMAKE_C_COMPILER_ID MATCHES "Clang")
if (CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compiler_warnings(-Wno-pointer-bool-conversion -Wno-missing-field-initializers -Wno-missing-braces)
endif ()

Expand Down

0 comments on commit 32dfed1

Please sign in to comment.