This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to tag v1.0.0
in repository osmium-tool.

commit 8d84ffe0ebb6e4448e3c92a2b95855b5ec25cf64
Author: Jochen Topf <joc...@topf.org>
Date:   Wed Dec 17 15:21:54 2014 +0100

    Make CMake config work with older versions of CMake.
---
 CMakeLists.txt            | 11 ++++++++++-
 cmake/FindOsmium.cmake    | 10 +++++++++-
 cmake/OsmiumOptions.cmake | 13 -------------
 3 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b1635b..50518c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -172,7 +172,16 @@ if(NOT USE_CPP_VERSION)
     set(USE_CPP_VERSION c++11)
 endif()
 message(STATUS "Use C++ version: ${USE_CPP_VERSION}")
-add_compile_options(-std=${USE_CPP_VERSION})
+# following only available from cmake 2.8.12:
+#   add_compile_options(-std=${USE_CPP_VERSION})
+# so using this instead:
+add_definitions(-std=${USE_CPP_VERSION})
+
+#----------------------------------------------------------------------
+
+if(NOT MSVC)
+    add_definitions(${OSMIUM_WARNING_OPTIONS})
+endif()
 
 
 #----------------------------------------------------------------------
diff --git a/cmake/FindOsmium.cmake b/cmake/FindOsmium.cmake
index d84bf84..56bc39e 100644
--- a/cmake/FindOsmium.cmake
+++ b/cmake/FindOsmium.cmake
@@ -224,7 +224,10 @@ if(MSVC)
 endif()
 
 if(APPLE)
-    add_compile_options(-stdlib=libc++)
+# following only available from cmake 2.8.12:
+#   add_compile_options(-stdlib=libc++)
+# so using this instead:
+    add_definitions(-stdlib=libc++)
     set(LDFLAGS ${LDFLAGS} -stdlib=libc++)
 endif()
 
@@ -233,7 +236,12 @@ endif()
 list(REMOVE_DUPLICATES OSMIUM_INCLUDE_DIRS)
 list(REMOVE_DUPLICATES OSMIUM_LIBRARIES)
 
+# This is a set of recommended warning options that can be added when compiling
+# libosmium code.
+set(OSMIUM_WARNING_OPTIONS "-Wall -Wextra -pedantic -Wredundant-decls 
-Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor 
-Woverloaded-virtual -Wsign-promo -Wold-style-cast -Wno-return-type" CACHE 
STRING "Recommended warning options for libosmium")
+
 if(Osmium_DEBUG)
   message(STATUS "OSMIUM_LIBRARIES=" ${OSMIUM_LIBRARIES})
   message(STATUS "OSMIUM_INCLUDE_DIRS=" ${OSMIUM_INCLUDE_DIRS})
 endif()
+
diff --git a/cmake/OsmiumOptions.cmake b/cmake/OsmiumOptions.cmake
index a09795a..524ef00 100644
--- a/cmake/OsmiumOptions.cmake
+++ b/cmake/OsmiumOptions.cmake
@@ -1,19 +1,6 @@
 # Setup common compiler options adviced for building Osmium headers
 
 if(NOT MSVC)
-    add_compile_options(
-        -Wall
-        -Wextra
-        -pedantic
-        -Wredundant-decls
-        -Wdisabled-optimization
-        -Wctor-dtor-privacy
-        -Wnon-virtual-dtor
-        -Woverloaded-virtual
-        -Wsign-promo
-        -Wold-style-cast
-    )
-
     #always compile with optimization, even in debug mode
     set(CMAKE_CXX_FLAGS_DEBUG -O3)
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g")

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/osmium-tool.git

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to