[osmium-tool] 51/97: Add 'Dev' build type. Remove need for OsmiumOptions.cmake.
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Tue Jul 21 20:15:34 UTC 2015
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 63af4316d33c3a82e5d3a3fec79ec30c899c3e85
Author: Jochen Topf <jochen at topf.org>
Date: Wed Dec 17 17:58:17 2014 +0100
Add 'Dev' build type. Remove need for OsmiumOptions.cmake.
---
CMakeLists.txt | 26 +++++++++++++++++++++-----
cmake/OsmiumOptions.cmake | 9 ---------
2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50518c0..7d475ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,8 +43,6 @@ if(NOT CRYPTOPP_FOUND)
set(MISSING_LIB 1)
endif()
-include(OsmiumOptions)
-
find_package(Osmium REQUIRED COMPONENTS io)
include_directories(${OSMIUM_INCLUDE_DIRS})
if(NOT OSMIUM_FOUND)
@@ -179,9 +177,27 @@ add_definitions(-std=${USE_CPP_VERSION})
#----------------------------------------------------------------------
-if(NOT MSVC)
- add_definitions(${OSMIUM_WARNING_OPTIONS})
-endif()
+set(CMAKE_CXX_FLAGS_NONE "-O3 -g"
+ CACHE STRING "Flags used by the compiler during all builds."
+ FORCE)
+
+set(CMAKE_CXX_FLAGS_DEV "-O3 -g ${OSMIUM_WARNING_OPTIONS}"
+ CACHE STRING "Flags used by the compiler during developer builds."
+ FORCE)
+set(CMAKE_EXE_LINKER_FLAGS_DEV ""
+ CACHE STRING "Flags used by the linker during developer builds."
+ FORCE)
+mark_as_advanced(
+ CMAKE_CXX_FLAGS_DEV
+ CMAKE_EXE_LINKER_FLAGS_DEV
+)
+
+set(CMAKE_CONFIGURATION_TYPES "Debug Release RelWithDebInfo MinSizeRel Dev")
+
+# Update the documentation string of CMAKE_BUILD_TYPE for GUIs
+set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
+ "Choose the type of build, options are: ${CMAKE_CONFIGURATION_TYPES}."
+ FORCE)
#----------------------------------------------------------------------
diff --git a/cmake/OsmiumOptions.cmake b/cmake/OsmiumOptions.cmake
deleted file mode 100644
index 524ef00..0000000
--- a/cmake/OsmiumOptions.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-# Setup common compiler options adviced for building Osmium headers
-
-if(NOT MSVC)
- #always compile with optimization, even in debug mode
- set(CMAKE_CXX_FLAGS_DEBUG -O3)
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g")
-endif()
-
-message(STATUS "Some compiler and linker options were changed by OsmiumOptions")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmium-tool.git
More information about the Pkg-grass-devel
mailing list