Skip to content

Commit

Permalink
Update build flags definitions for cmake projects
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkCaster committed Feb 17, 2018
1 parent fc3354a commit 81c717d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Executor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ include_directories("${CMAKE_BINARY_DIR}")

#set flags for gcc
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
#platform dependent gcc flags
set(OPTFLAGS "-fpic -pedantic")
set(OPTFLAGS "-pedantic")
#general compiler flags for gcc compiler
##You can enable additional warnings for paranoics: -Wunsuffixed-float-constants -Wpadded
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra -Wshadow -Wstrict-overflow=5 -Wwrite-strings -Winit-self -Wmissing-include-dirs -Wbad-function-cast -Wc++-compat -Wcast-qual -Wcast-align -Wconversion -Wlogical-op -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wdisabled-optimization -Woverlength-strings -Wfloat-equal -Wswitch-default ${OPTFLAGS}")
Expand Down
3 changes: 2 additions & 1 deletion X11Util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ include_directories("${CMAKE_BINARY_DIR}")

#set flags for gcc
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
#platform dependent gcc flags
set(OPTFLAGS "-fpic -pedantic")
set(OPTFLAGS "-pedantic")
#general compiler flags for gcc compiler
##You can enable additional warnings for paranoics: -Wunsuffixed-float-constants -Wpadded
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra -Wshadow -Wstrict-overflow=5 -Wwrite-strings -Winit-self -Wmissing-include-dirs -Wbad-function-cast -Wc++-compat -Wcast-qual -Wcast-align -Wconversion -Wlogical-op -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wdisabled-optimization -Woverlength-strings -Wfloat-equal -Wswitch-default ${OPTFLAGS}")
Expand Down

0 comments on commit 81c717d

Please sign in to comment.