mirror of
https://github.com/alkoleft/yaxunit-addin.git
synced 2026-06-16 07:35:40 +02:00
Build with GA
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest]
|
||||
arch: [x86, x64]
|
||||
include:
|
||||
- os: windows-latest
|
||||
arch: x64
|
||||
generator: VS16Win64
|
||||
- os: windows-latest
|
||||
arch: x86
|
||||
generator: VS16Win32
|
||||
- os: ubuntu-latest
|
||||
generator: Ninja
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
arch: x86
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: sudo apt install uuid-dev
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
|
||||
- uses: lukka/run-cmake@v2
|
||||
id: runcmake_cmd
|
||||
with:
|
||||
buildDirectory: ${{ runner.workspace }}/build
|
||||
cmakeGenerator: ${{ matrix.generator }}
|
||||
cmakeBuildType: Release
|
||||
+5
-1
@@ -33,7 +33,11 @@ endif ()
|
||||
target_include_directories(${TARGET} PRIVATE
|
||||
include)
|
||||
|
||||
if (MSVC)
|
||||
if (WIN32 AND NOT MSVC)
|
||||
message(FATAL_ERROR "Must be compiled with MSVC on Windows")
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
if (STATIC_CRT)
|
||||
string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef COMPONENT_H
|
||||
#define COMPONENT_H
|
||||
|
||||
#include <ctime>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
@@ -116,6 +116,10 @@ variant_t SampleAddIn::currentDate() {
|
||||
using namespace std;
|
||||
tm current{};
|
||||
time_t t = time(nullptr);
|
||||
#ifdef _WINDOWS
|
||||
localtime_s(¤t, &t);
|
||||
#else
|
||||
localtime_r(&t, ¤t);
|
||||
#endif
|
||||
return current;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user