[osmium-tool] 12/13: Remove 'format' target, use fix-formatting.sh script instead.
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Tue Jul 21 20:15:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to tag v1.0.1
in repository osmium-tool.
commit d6c5fb7fd421729cc46fdb159719a673a8255a24
Author: Jochen Topf <jochen at topf.org>
Date: Tue Mar 31 21:14:54 2015 +0200
Remove 'format' target, use fix-formatting.sh script instead.
Because CMake builds usually happen outside the source directory, fixing up the
source code doesn't make sense there.
---
CMakeLists.txt | 18 ------------------
fix-formatting.sh | 7 +++++++
2 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86732e9..a8554a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,24 +131,6 @@ endif(PANDOC)
#-----------------------------------------------------------------------------
#
-# Optional "format" target that formats C++ code
-#
-#-----------------------------------------------------------------------------
-message(STATUS "Looking for astyle")
-find_program(ASTYLE astyle)
-
-if(ASTYLE)
- add_custom_target(format astyle --style=java --indent-namespaces --indent-switches --pad-header --lineend=linux --suffix=none --recursive src/*pp)
- message(STATUS "Looking for astyle - found")
- message(STATUS " Adding 'indent' target")
-else()
- message(STATUS "Looking for astyle - not found")
- message(STATUS " No 'indent' target available")
-endif(ASTYLE)
-
-
-#-----------------------------------------------------------------------------
-#
# Decide which C++ version to use (Minimum/default: C++11).
#
#-----------------------------------------------------------------------------
diff --git a/fix-formatting.sh b/fix-formatting.sh
new file mode 100755
index 0000000..41ae193
--- /dev/null
+++ b/fix-formatting.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# fix-formatting
+#
+
+exec astyle --style=java --indent-namespaces --indent-switches --pad-header --lineend=linux --suffix=none src/*pp
+
--
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