[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 117/473: BUILD: make -Werror optional
noreply at xfce.org
noreply at xfce.org
Mon Feb 16 23:54:47 CET 2015
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit c1907db50b334e0c4394d20cb586995ff197ef37
Author: hasufell <julian.ospald at googlemail.com>
Date: Thu Jul 18 14:35:35 2013 +0200
BUILD: make -Werror optional
-Werror can break the build in so many ways that it
should only be used for development or if it's a specific
-Werror=foo flag.
---
CMakeLists.txt | 3 +++
src/CMakeLists.txt | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c85231b..85fe977 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,9 @@ endif()
project(whiskermenu)
+# options
+option(ENABLE_WERROR "Enable -Werror flag for development" OFF)
+
include(GNUInstallDirs)
add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 29c3570..8f3a294 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,7 @@
-set(WHISKERMENU_FLAGS "-Wall -Wextra -Werror")
+set(WHISKERMENU_FLAGS "-Wall -Wextra")
+if(ENABLE_WERROR)
+ set(WHISKERMENU_FLAGS "${WHISKERMENU_FLAGS} -Werror")
+endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WHISKERMENU_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden ${WHISKERMENU_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list