From 7e349a499c7d15844e09c002cbad21019125f0be Mon Sep 17 00:00:00 2001 From: Oleg Vorobiov Date: Fri, 5 Aug 2022 01:38:05 +0300 Subject: [PATCH] driver: Windows CI terribleness Signed-off-by: Oleg Vorobiov --- .github/workflows/cmake.yml | 28 ++++++++--------------- driver/CMakeLists.txt | 2 ++ driver/gaze_master_plugins/CMakeLists.txt | 2 +- driver/src/addons.h | 17 ++++++++++++-- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 2138883..00acbfb 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -28,31 +28,21 @@ jobs: - name: Clone submodules run: git submodule init && git submodule update - - name: Python Setup - uses: actions/setup-python@v1 + - name: Download and Install Boost + uses: MarkusJx/install-boost@v2.3.0 with: - python-version: '3.x' - - uses: ./.github/actions/setup-conan - - - name: Downloading Windows Dependencies - if: runner.os == 'Windows' - run: | - ${boostroot} = "${env:GITHUB_WORKSPACE}\boost_install" - conan install boost/1.72.0@ -o boost:header_only=True -g deploy --install-folder ${boostroot} - dir ${boostroot} - dir ${boostroot}\boost - echo "BOOST_ROOT=${boostroot}\boost" >> ${env:GITHUB_ENV} - - - name: Downloading Linux Dependencies - if: runner.os != 'Windows' - run: | - sudo apt-get install -y libboost-dev + boost_version: 1.73.0 # Configure CMake projects - name: Configure Driver CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake driver -B ${{github.workspace}}/driver_build -DCMAKE_BUILD_TYPE=${{inputs.buildType}} + run: cmake driver -B ${{github.workspace}}/driver_build\ + -DCMAKE_BUILD_TYPE=${{inputs.buildType}} + # -DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include\ + # -DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib + env: + BOOST_ROOT: "./boost/boost" - name: Configure Poser Cmake run: cmake bindings/cpp/examples/uduTest -B ${{github.workspace}}/poser_build -DCMAKE_BUILD_TYPE=${{inputs.buildType}} diff --git a/driver/CMakeLists.txt b/driver/CMakeLists.txt index f677476..93067d6 100644 --- a/driver/CMakeLists.txt +++ b/driver/CMakeLists.txt @@ -147,6 +147,8 @@ target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS} ) +message(NOTICE "boost_root: ${BOOST_ROOT}|") + install( TARGETS ${TARGET_NAME} diff --git a/driver/gaze_master_plugins/CMakeLists.txt b/driver/gaze_master_plugins/CMakeLists.txt index 80023fb..e8c9a63 100644 --- a/driver/gaze_master_plugins/CMakeLists.txt +++ b/driver/gaze_master_plugins/CMakeLists.txt @@ -17,7 +17,7 @@ target_include_directories(gaze_logger PRIVATE ) target_link_libraries(gaze_logger PRIVATE - ${Boost_DLL_LIBRARy} + ${Boost_DLL_LIBRARY} ${CMAKE_DL_LIBS} ) diff --git a/driver/src/addons.h b/driver/src/addons.h index 203acbb..f6fbf8f 100644 --- a/driver/src/addons.h +++ b/driver/src/addons.h @@ -14,8 +14,21 @@ #include #ifdef WIN - #include - #define _snprintf _snprintf_s +#include + // #define _snprintf _snprintf_s + // #define snprintf _snprintf + // #undef snprintf + namespace std { + inline int snprintf (char *s, size_t maxlen, const char *format, ...) + { + va_list arg; + int done; + va_start (arg, format); + done = _snprintf_s(s, maxlen, maxlen, format, arg, 0); + va_end (arg); + return done; + } + } #endif #include