aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2014-12-16 00:07:11 +0800
committerChia-I Wu <olv@lunarg.com>2014-12-16 10:33:49 +0800
commitaa6d884237bfa9f4029b878ecff1b483dbcfb44b (patch)
treecb41f43d39903259135e1db280d003f4ccd6bec2
parent4185b96210c54c43429f58857972db1326bddecd (diff)
downloadusermoji-aa6d884237bfa9f4029b878ecff1b483dbcfb44b.tar.xz
cmake: add -Wall, -Wextra, and others to CMAKE_CXX_FLAGS
Make CMAKE_C_FLAGS and CMAKE_CXX_FLAGS share some flags. Specifically, -Wall and -Wextra are now specified in CMAKE_CXX_FLAGS.
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c3deb41..ce367ed2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,9 @@ include_directories("${PROJECT_SOURCE_DIR}/include")
include(FindPkgConfig)
if (CMAKE_COMPILER_IS_GNUCC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Werror -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter")
+ set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ${COMMON_COMPILE_FLAGS} -Werror")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILE_FLAGS}")
if (UNIX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
endif()