Skip to content

Commit ed81585

Browse files
authored
Build option to enable/disable update check (symless#24)
* Add option to enable SYNERGY_VERSION_CHECK in CMake * Add SYNERGY_VERSION_CHECK to CI workflow CMake commands
1 parent 813a45e commit ed81585

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ jobs:
9898
cmake -B build `
9999
--preset=windows-release `
100100
-DUSE_TOMLPLUSPLUS=OFF `
101-
-DUSE_CLI11=OFF
101+
-DUSE_CLI11=OFF `
102+
-DSYNERGY_VERSION_CHECK=${{ vars.SYNERGY_VERSION_CHECK }}
102103
103104
- name: Build
104105
run: cmake --build build -j8
@@ -180,7 +181,8 @@ jobs:
180181
cmake -B build \
181182
--preset=macos-release \
182183
-DUSE_TOMLPLUSPLUS=OFF \
183-
-DUSE_CLI11=OFF
184+
-DUSE_CLI11=OFF \
185+
-DSYNERGY_VERSION_CHECK=${{ vars.SYNERGY_VERSION_CHECK }}
184186
185187
- name: Build
186188
run: cmake --build build -j8
@@ -290,7 +292,8 @@ jobs:
290292
cmake -B build \
291293
--preset=linux-release ${{ matrix.distro.extra-cmake-args }} \
292294
-DUSE_TOMLPLUSPLUS=OFF \
293-
-DUSE_CLI11=OFF
295+
-DUSE_CLI11=OFF \
296+
-DSYNERGY_VERSION_CHECK=${{ vars.SYNERGY_VERSION_CHECK }}
294297
295298
- name: Build
296299
run: cmake --build build -j8

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ cmake_minimum_required(VERSION 3.8)
1717

1818
project(synergy C CXX)
1919

20+
option(SYNERGY_VERSION_CHECK "Enable version check" ON)
21+
if (SYNERGY_VERSION_CHECK)
22+
add_definitions(-DSYNERGY_VERSION_CHECK)
23+
endif()
24+
2025
include(cmake/Odin.cmake)
2126
include(cmake/Licensing.cmake)
2227
include(cmake/Build.cmake)

odin

0 commit comments

Comments
 (0)