Warn when not compiling against the matching libdc version

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-06-22 17:53:53 -07:00
parent d58de37167
commit 63a4a755a3
2 changed files with 14 additions and 1 deletions

View file

@ -17,6 +17,16 @@
#include <libdivecomputer/version.h>
#include "libdivecomputer.h"
#if !defined(SSRF_LIBDC_VERSION)
#pragma message "You are not compiling against the Subsurface branch of libdivecomputer"
#pragma message "While this may still work, you are missing important features of Subsurface"
#pragma message "Please get it from http://github.com/Subsurface-divelog/libdc Subsurface-branch"
#else
#if !defined(SSRF_CUSTOM_IO)
#pragma message "You are compiling against an older version of the Subsurface branch of libdivecomputer"
#pragma message "which doesn't support the new SSRF_CUSTOM_IO model. Please update libdc"
#endif
#endif
//
// If we have an old libdivecomputer, it doesn't
// have the new DC_TANKINFO bits, but just volume