diff --git a/.github/workflows/cmake-build.yml b/.github/workflows/cmake-build.yml new file mode 100644 index 0000000..d68e724 --- /dev/null +++ b/.github/workflows/cmake-build.yml @@ -0,0 +1,57 @@ +# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml +name: CMake on multiple platforms + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. + fail-fast: false + + # Set up a matrix to run the following 3 configurations: + # 1. + # 2. + # 3. + # + # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. + matrix: + os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04] + build_type: [Release] + c_compiler: [gcc, clang] + include: + - os: ubuntu-24.04 + c_compiler: gcc + cpp_compiler: g++ + - os: ubuntu-24.04 + c_compiler: clang + cpp_compiler: clang++ + - os: ubuntu-22.04 + c_compiler: gcc + cpp_compiler: g++ + - os: ubuntu-22.04 + c_compiler: clang + cpp_compiler: clang++ + - os: ubuntu-20.04 + c_compiler: gcc + cpp_compiler: g++ + - os: ubuntu-20.04 + c_compiler: clang + cpp_compiler: clang++ + + steps: + - uses: actions/checkout@v4 + + - name: Build using CMake + run: > + ./build_samples.sh + --no-tests + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} diff --git a/nx_kit/src/json11/json11.cpp b/nx_kit/src/json11/json11.cpp index 6de413d..503d73e 100644 --- a/nx_kit/src/json11/json11.cpp +++ b/nx_kit/src/json11/json11.cpp @@ -157,7 +157,7 @@ class Value : public JsonValue { // Constructors explicit Value(const T &value) : m_value(value) {} - explicit Value(T &&value) : m_value(move(value)) {} + explicit Value(T &&value) : m_value(std::move(value)) {} // Get type tag Json::Type type() const override { @@ -204,7 +204,7 @@ class JsonString final : public Value { const string &string_value() const override { return m_value; } public: explicit JsonString(const string &value) : Value(value) {} - explicit JsonString(string &&value) : Value(move(value)) {} + explicit JsonString(string &&value) : Value(std::move(value)) {} }; class JsonArray final : public Value { @@ -212,7 +212,7 @@ class JsonArray final : public Value { const Json & operator[](size_t i) const override; public: explicit JsonArray(const Json::array &value) : Value(value) {} - explicit JsonArray(Json::array &&value) : Value(move(value)) {} + explicit JsonArray(Json::array &&value) : Value(std::move(value)) {} }; class JsonObject final : public Value { @@ -220,7 +220,7 @@ class JsonObject final : public Value { const Json & operator[](const string &key) const override; public: explicit JsonObject(const Json::object &value) : Value(value) {} - explicit JsonObject(Json::object &&value) : Value(move(value)) {} + explicit JsonObject(Json::object &&value) : Value(std::move(value)) {} }; class JsonNull final : public Value { @@ -262,12 +262,12 @@ Json::Json(double value) : m_ptr(make_shared(value)) { Json::Json(int value) : m_ptr(make_shared(value)) {} Json::Json(bool value) : m_ptr(value ? statics().t : statics().f) {} Json::Json(const string &value) : m_ptr(make_shared(value)) {} -Json::Json(string &&value) : m_ptr(make_shared(move(value))) {} +Json::Json(string &&value) : m_ptr(make_shared(std::move(value))) {} Json::Json(const char * value) : m_ptr(make_shared(value)) {} Json::Json(const Json::array &values) : m_ptr(make_shared(values)) {} -Json::Json(Json::array &&values) : m_ptr(make_shared(move(values))) {} +Json::Json(Json::array &&values) : m_ptr(make_shared(std::move(values))) {} Json::Json(const Json::object &values) : m_ptr(make_shared(values)) {} -Json::Json(Json::object &&values) : m_ptr(make_shared(move(values))) {} +Json::Json(Json::object &&values) : m_ptr(make_shared(std::move(values))) {} /* * * * * * * * * * * * * * * * * * * * * Accessors @@ -382,7 +382,7 @@ struct JsonParser final { * Mark this parse as failed. */ Json fail(string &&msg) { - return fail(move(msg), Json()); + return fail(std::move(msg), Json()); } template diff --git a/samples/cloudfuse_plugin/src/nx/vms_server_plugins/analytics/stub/settings/engine.cpp b/samples/cloudfuse_plugin/src/nx/vms_server_plugins/analytics/stub/settings/engine.cpp index f9f5ecd..cc513ea 100644 --- a/samples/cloudfuse_plugin/src/nx/vms_server_plugins/analytics/stub/settings/engine.cpp +++ b/samples/cloudfuse_plugin/src/nx/vms_server_plugins/analytics/stub/settings/engine.cpp @@ -4,7 +4,9 @@ #include #include +#include #include +#include #include #include diff --git a/src/cloudfuse/child_process_linux.cpp b/src/cloudfuse/child_process_linux.cpp index d8cac06..ee80db0 100644 --- a/src/cloudfuse/child_process_linux.cpp +++ b/src/cloudfuse/child_process_linux.cpp @@ -1,6 +1,7 @@ #if defined(__linux__) #include "child_process.h" #include +#include #include #include