summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cmake/msvc.cmake1
-rw-r--r--coverity/build/build.sh42
-rw-r--r--logic/mappings.cpp4
3 files changed, 44 insertions, 3 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake
index d71e47ae..823bfffe 100644
--- a/cmake/msvc.cmake
+++ b/cmake/msvc.cmake
@@ -59,6 +59,7 @@ set(_LDFLAGS_DEBUG "")
set(_LDFLAGS_STATIC "/WX")
set(_LDFLAGS_STATIC_RELEASE "/LTCG:INCREMENTAL")
+set(_LDFLAGS_STATIC_DEBUG "")
foreach(j C CXX)
foreach(i "" _DEBUG _RELEASE)
diff --git a/coverity/build/build.sh b/coverity/build/build.sh
new file mode 100644
index 00000000..332aee91
--- /dev/null
+++ b/coverity/build/build.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+function cleanup() {
+ killall cc1 cc1plus collect2 lto1 lto-wrapper gcc g++ i686-w64-mingw32-gcc i686-w64-mingw32-{c++,g++} 2>/dev/null
+ rm -f "$myfile"
+}
+
+function signal() {
+ set +e
+ trap '' EXIT
+ echo "error: $1" 1>&2
+ cleanup
+ exit 1
+}
+
+for k in HUP INT QUIT ILL BUS FPE SEGV PIPE; do
+ trap "signal 'got fatal signal SIG'$k" SIG"$k"
+done
+
+trap 'signal "fatal return $?"' EXIT
+
+set -e
+
+mydate="$(date --iso-8601=minutes)"
+mydir="$(dirname -- "$0")"
+myfile="$(pwd)/opentrack-"$mydate".tar.xz"
+
+cd "$mydir"
+for k in opencv aruco libovr-025 libovr-042 libovr-080; do
+ ninja -C "./$k"
+done
+
+ninja -C ./libovr-140 install
+
+cd "./opentrack"
+
+cmake .
+ninja clean
+cov-build --dir cov-int ninja
+tar Jcf ../opentrack-"$mydate".tar.xz cov-int
+trap '' EXIT
+exit 0
diff --git a/logic/mappings.cpp b/logic/mappings.cpp
index 115e9083..f9a149e3 100644
--- a/logic/mappings.cpp
+++ b/logic/mappings.cpp
@@ -1,5 +1,3 @@
-#pragma once
-
#include "mappings.hpp"
Map::Map(QString primary, QString secondary, int max_x, int max_y, axis_opts& opts) :
@@ -33,5 +31,5 @@ Mappings::Mappings(std::vector<axis_opts*> opts) :
Map("spline-yaw", "alt-spline-yaw", 180, 180, *opts[Yaw]),
Map("spline-pitch", "alt-spline-pitch", 180, 180, *opts[Pitch]),
Map("spline-roll", "alt-spline-roll", 180, 180, *opts[Roll])
- }
+ }
{}