summaryrefslogtreecommitdiff
path: root/compiler/cpp/CMakeLists.txt
diff options
context:
space:
mode:
authorRoger Meier <roger@apache.org>2014-10-13 02:13:35 +0200
committerRoger Meier <roger@apache.org>2014-10-13 02:13:35 +0200
commitec300e33d49bc57d8cc3b744ea16e5af615c8f94 (patch)
tree190f770232414f8b8e3eea94fb7a87a11d24aa43 /compiler/cpp/CMakeLists.txt
parentf31eba9d459bb927be3af7f608a3c4e8cd0174e0 (diff)
downloadthrift-ec300e33d49bc57d8cc3b744ea16e5af615c8f94.tar.gz
THRIFT-1462 add more strict compiler flags
Patch: Roger Meier
Diffstat (limited to 'compiler/cpp/CMakeLists.txt')
-rw-r--r--compiler/cpp/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/cpp/CMakeLists.txt b/compiler/cpp/CMakeLists.txt
index 548dec73b..606bfcd5b 100644
--- a/compiler/cpp/CMakeLists.txt
+++ b/compiler/cpp/CMakeLists.txt
@@ -152,9 +152,14 @@ install(TARGETS thrift DESTINATION bin)
# mingw32 does not support c++0x features
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
-set(CMAKE_CXX_FLAGS "-std=c++0x")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
+endif()
+
+
# create a Distribution Package for the Apache Thrift Compiler
set(CPACK_PACKAGE_NAME "Apache Thrift")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Thrift Compiler")