File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR IOS)
136
136
if (ANDROID )
137
137
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pedantic" )
138
138
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes -Wno-pointer-arith" )
139
+ elseif (CMAKE_SYSTEM_NAME MATCHES "Linux" )
140
+ set (WARNINGS -Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls )
141
+ set (LINUX_SUPPRESSIONS -Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs )
142
+ set (WARNINGS ${WARNINGS} ${LINUX_SUPPRESSIONS} )
143
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration" )
139
144
else ()
140
145
set (WARNINGS -Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls )
141
146
set (OSX_SUPPRESSIONS -Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs )
Original file line number Diff line number Diff line change @@ -135,7 +135,11 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
135
135
endif ()
136
136
set (WEBSOCKETPP_PLATFORM_TSL_LIBS ssl crypto )
137
137
set (WEBSOCKETPP_BOOST_LIBS system thread )
138
- set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++0x -stdlib=libc++" ) # todo: is libc++ really needed here?
138
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux" )
139
+ set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++0x" )
140
+ else ()
141
+ set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++0x -stdlib=libc++" ) # todo: is libc++ really needed here?
142
+ endif ()
139
143
if (NOT APPLE )
140
144
add_definitions (-DNDEBUG -Wall -Wno-padded ) # todo: should we use CMAKE_C_FLAGS for these?
141
145
endif ()
@@ -241,4 +245,3 @@ install (FILES
241
245
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY} /websocketpp-config.cmake"
242
246
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY} /websocketpp-configVersion.cmake"
243
247
DESTINATION "${INSTALL_CMAKE_DIR} " COMPONENT dev )
244
-
You can’t perform that action at this time.
0 commit comments