summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy2
-rw-r--r--CMakeLists.txt5
-rw-r--r--cmake/modules/clangd.in2
-rw-r--r--cmake/modules/version.cpp.in2
-rw-r--r--examples/cipherpack/commandline.cpp2
-rw-r--r--include/cipherpack/version.hpp4
-rw-r--r--java/jni/cipherpack/CPFactory.cxx4
-rw-r--r--test/cipherpack/CMakeLists.txt1
8 files changed, 12 insertions, 10 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 407aca4..7211f7f 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -16,7 +16,7 @@ CheckOptions:
value: 'true'
WarningsAsErrors: '*'
-HeaderFilterRegex: '(include/cipherpack/.*|jaulib/include/jau/[a-zA-Z0-0]*|jaulib/include/jau/jni/[a-zA-Z0-0]*)\.hpp'
+HeaderFilterRegex: '(include/cipherpack/.*|jaulib/include/jau/.*)\.hpp'
# AnalyzeTemporaryDtors: false
FormatStyle: none
InheritParentConfig: false
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fc50e3..6f43079 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,8 +22,9 @@ JaulibSetup()
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.clangd)
# Fixup clangd w/ absolute path
-set (cipherpack_clangd_source_args "-isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/include, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/src, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/java_jni/jni, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/java_jni/jni/jau, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/test")
-set (cipherpack_clangd_source_args "${cipherpack_clangd_source_args} -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/include, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/src/cipherpack, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/java/jni, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/java/jni/cipherpack, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/test/cipherpack")
+set (cipherpack_clangd_source_args "-isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/include, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/src, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/java_jni/jni, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/java_jni/jni/jau")
+set (cipherpack_clangd_source_args "${cipherpack_clangd_source_args}, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/include/catch2_jau, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/jaulib/test")
+set (cipherpack_clangd_source_args "${cipherpack_clangd_source_args}, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/include, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/src/cipherpack, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/java/jni, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/java/jni/cipherpack, -isystem, ${CMAKE_CURRENT_SOURCE_DIR}/test/cipherpack")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/clangd.in
${CMAKE_CURRENT_SOURCE_DIR}/.clangd)
endif()
diff --git a/cmake/modules/clangd.in b/cmake/modules/clangd.in
index e6a4008..368585d 100644
--- a/cmake/modules/clangd.in
+++ b/cmake/modules/clangd.in
@@ -15,7 +15,7 @@
# Tell clangd to use the compile_commands.json file in the build/default folder
CompileFlags:
CompilationDatabase: @CMAKE_CURRENT_BINARY_DIR@
- Add: [@cipherpack_clangd_source_args@]
+ Add: [@cxx_clangd_flags@, @cipherpack_clangd_source_args@]
Diagnostics:
UnusedIncludes: Strict
diff --git a/cmake/modules/version.cpp.in b/cmake/modules/version.cpp.in
index a81671d..d49601d 100644
--- a/cmake/modules/version.cpp.in
+++ b/cmake/modules/version.cpp.in
@@ -1,5 +1,5 @@
#include <cipherpack/version.hpp>
-const char* cipherpack::VERSION = "@cipherpack_VERSION_LONG@";
+const jau::util::VersionNumber cipherpack::VERSION("@cipherpack_VERSION_LONG@");
const char* cipherpack::VERSION_SHORT = "@cipherpack_VERSION_SHORT@";
const char* cipherpack::VERSION_API = "@cipherpack_VERSION_API@";
diff --git a/examples/cipherpack/commandline.cpp b/examples/cipherpack/commandline.cpp
index 51a7776..35878f9 100644
--- a/examples/cipherpack/commandline.cpp
+++ b/examples/cipherpack/commandline.cpp
@@ -92,7 +92,7 @@ class LoggingCipherpackListener : public cipherpack::CipherpackListener {
typedef std::shared_ptr<LoggingCipherpackListener> LoggingCipherpackListenerRef;
static void print_version() {
- fprintf(stderr, "Cipherpack Native Version %s (API %s)\n", cipherpack::VERSION, cipherpack::VERSION_API);
+ fprintf(stderr, "Cipherpack Native Version %s (API %s)\n", cipherpack::VERSION.toString().c_str(), cipherpack::VERSION_API);
}
static void print_usage(const char* progname) {
diff --git a/include/cipherpack/version.hpp b/include/cipherpack/version.hpp
index c094929..7e785d1 100644
--- a/include/cipherpack/version.hpp
+++ b/include/cipherpack/version.hpp
@@ -26,9 +26,11 @@
#ifndef JAU_CIPHERPACK_VERSION_HPP_
#define JAU_CIPHERPACK_VERSION_HPP_
+#include <jau/util/VersionNumber.hpp>
+
namespace cipherpack {
- extern const char* VERSION;
+ extern const jau::util::VersionNumber VERSION;
extern const char* VERSION_SHORT;
extern const char* VERSION_API;
diff --git a/java/jni/cipherpack/CPFactory.cxx b/java/jni/cipherpack/CPFactory.cxx
index dac2f92..f13ef3d 100644
--- a/java/jni/cipherpack/CPFactory.cxx
+++ b/java/jni/cipherpack/CPFactory.cxx
@@ -33,9 +33,7 @@ jstring Java_org_cipherpack_CPFactory_getNativeVersion(JNIEnv *env, jclass clazz
{
try {
(void) clazz;
-
- std::string api_version = std::string(cipherpack::VERSION);
- return env->NewStringUTF(api_version.c_str());
+ return env->NewStringUTF(cipherpack::VERSION.versionString().c_str());
} catch(...) {
rethrow_and_raise_java_exception(env);
}
diff --git a/test/cipherpack/CMakeLists.txt b/test/cipherpack/CMakeLists.txt
index 18a29aa..c07451e 100644
--- a/test/cipherpack/CMakeLists.txt
+++ b/test/cipherpack/CMakeLists.txt
@@ -1,5 +1,6 @@
include_directories(
${PROJECT_SOURCE_DIR}/jaulib/include
+ ${PROJECT_SOURCE_DIR}/jaulib/include/catch2_jau
${AMALGAMATION_ARCH_INC}
${PROJECT_SOURCE_DIR}/include
)