Skip to content

Commit d2fbc28

Browse files
authored
Merge pull request #93 from orange-cpp/feaure/small_improvement
removed useless option
2 parents dccc12e + 6438575 commit d2fbc28

File tree

4 files changed

+36
-31
lines changed

4 files changed

+36
-31
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ jobs:
4040
git clone https://github.com/microsoft/vcpkg "$VCPKG_ROOT"
4141
- name: Configure (cmake --preset)
4242
shell: bash
43-
run: cmake --preset linux-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF -DOMATH_BUILD_VIA_VCPKG=ON -DVCPKG_MANIFEST_FEATURES="imgui;avx2;tests"
43+
run: cmake --preset linux-release-vcpkg -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF -DVCPKG_MANIFEST_FEATURES="imgui;avx2;tests"
4444

4545
- name: Build
4646
shell: bash
47-
run: cmake --build cmake-build/build/linux-release --target unit_tests omath
47+
run: cmake --build cmake-build/build/linux-release-vcpkg --target unit_tests omath
4848

4949
- name: Run unit_tests
5050
shell: bash
@@ -75,11 +75,11 @@ jobs:
7575

7676
- name: Configure (cmake --preset)
7777
shell: bash
78-
run: cmake --preset windows-release -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF -DOMATH_BUILD_VIA_VCPKG=ON -DVCPKG_MANIFEST_FEATURES="imgui;avx2;tests"
78+
run: cmake --preset windows-release-vcpkg -DOMATH_BUILD_TESTS=ON -DOMATH_BUILD_BENCHMARK=OFF -DVCPKG_MANIFEST_FEATURES="imgui;avx2;tests"
7979

8080
- name: Build
8181
shell: bash
82-
run: cmake --build cmake-build/build/windows-release --target unit_tests omath
82+
run: cmake --build cmake-build/build/windows-release-vcpkg --target unit_tests omath
8383

8484
- name: Run unit_tests.exe
8585
shell: bash

.idea/vcs.xml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,8 @@ option(OMATH_SUPRESS_SAFETY_CHECKS "Supress some safety checks in release build
2323
option(OMATH_USE_UNITY_BUILD "Will enable unity build to speed up compilation" OFF)
2424
option(OMATH_ENABLE_LEGACY "Will enable legacy classes that MUST be used ONLY for backward compatibility" ON)
2525

26-
option(OMATH_BUILD_VIA_VCPKG "Will enable building using vcpkg, vcpkg will override some options that were set in vcpkg.json file, and search for dependencies using vcpkg" OFF)
2726

28-
if (OMATH_BUILD_VIA_VCPKG AND NOT CMAKE_TOOLCHAIN_FILE)
29-
message(FATAL_ERROR "[${PROJECT_NAME}] CMAKE_TOOLCHAIN_FILE IS EMPTY! Please set env variable called 'VCPKG_ROOT' to vcpkg root folder here is an example: 'C:/vcpkg' or '/home/user/vcpkg' ")
30-
endif ()
31-
32-
if (OMATH_BUILD_VIA_VCPKG AND VCPKG_MANIFEST_FEATURES)
27+
if (VCPKG_MANIFEST_FEATURES)
3328
foreach (omath_feature IN LISTS VCPKG_MANIFEST_FEATURES)
3429
if (omath_feature STREQUAL "imgui")
3530
set(OMATH_IMGUI_INTEGRATION ON)

CMakePresets.json

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"installDir": "${sourceDir}/cmake-build/install/${presetName}",
1010
"cacheVariables": {
1111
"CMAKE_CXX_COMPILER": "cl.exe",
12-
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
13-
"VCPKG_INSTALLED_DIR": "${sourceDir}/cmake-build/vcpkg_installed",
1412
"CMAKE_MAKE_PROGRAM": "Ninja"
1513
},
1614
"condition": {
@@ -19,6 +17,17 @@
1917
"rhs": "Windows"
2018
}
2119
},
20+
{
21+
"name": "windows-base-vcpkg",
22+
"hidden": true,
23+
"inherits": "windows-base",
24+
"cacheVariables": {
25+
"OMATH_BUILD_VIA_VCPKG": "ON",
26+
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
27+
"VCPKG_INSTALLED_DIR": "${sourceDir}/cmake-build/vcpkg_installed",
28+
"VCPKG_MANIFEST_FEATURES": "tests;imgui;avx2"
29+
}
30+
},
2231
{
2332
"name": "windows-debug",
2433
"displayName": "Debug",
@@ -30,17 +39,15 @@
3039
{
3140
"name": "windows-debug-vcpkg",
3241
"displayName": "Debug",
33-
"inherits": "windows-base",
42+
"inherits": "windows-base-vcpkg",
3443
"cacheVariables": {
35-
"CMAKE_BUILD_TYPE": "Debug",
36-
"OMATH_BUILD_VIA_VCPKG": "ON",
37-
"VCPKG_MANIFEST_FEATURES": "tests;imgui;avx2"
44+
"CMAKE_BUILD_TYPE": "Debug"
3845
}
3946
},
4047
{
4148
"name": "windows-release-vcpkg",
4249
"displayName": "Release",
43-
"inherits": "windows-base",
50+
"inherits": "windows-base-vcpkg",
4451
"cacheVariables": {
4552
"CMAKE_BUILD_TYPE": "Release",
4653
"OMATH_BUILD_VIA_VCPKG": "ON"
@@ -62,8 +69,6 @@
6269
"installDir": "${sourceDir}/cmake-build/install/${presetName}",
6370
"cacheVariables": {
6471
"CMAKE_CXX_COMPILER": "clang++",
65-
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
66-
"VCPKG_INSTALLED_DIR": "${sourceDir}/cmake-build/vcpkg_installed",
6772
"CMAKE_MAKE_PROGRAM": "ninja"
6873
},
6974
"condition": {
@@ -72,6 +77,17 @@
7277
"rhs": "Linux"
7378
}
7479
},
80+
{
81+
"name": "linux-base-vcpkg",
82+
"hidden": true,
83+
"inherits": "linux-base",
84+
"cacheVariables": {
85+
"OMATH_BUILD_VIA_VCPKG": "ON",
86+
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
87+
"VCPKG_INSTALLED_DIR": "${sourceDir}/cmake-build/vcpkg_installed",
88+
"VCPKG_MANIFEST_FEATURES": "tests;imgui;avx2"
89+
}
90+
},
7591
{
7692
"name": "linux-debug",
7793
"displayName": "Linux Debug",
@@ -83,10 +99,9 @@
8399
{
84100
"name": "linux-debug-vcpkg",
85101
"displayName": "Linux Debug",
86-
"inherits": "linux-base",
102+
"inherits": "linux-base-vcpkg",
87103
"cacheVariables": {
88-
"CMAKE_BUILD_TYPE": "Debug",
89-
"OMATH_BUILD_VIA_VCPKG": "ON"
104+
"CMAKE_BUILD_TYPE": "Debug"
90105
}
91106
},
92107
{
@@ -100,10 +115,9 @@
100115
{
101116
"name": "linux-release-vcpkg",
102117
"displayName": "Linux Release",
103-
"inherits": "linux-debug",
118+
"inherits": "linux-base-vcpkg",
104119
"cacheVariables": {
105-
"CMAKE_BUILD_TYPE": "Release",
106-
"OMATH_BUILD_VIA_VCPKG": "ON"
120+
"CMAKE_BUILD_TYPE": "Release"
107121
}
108122
},
109123
{
@@ -134,8 +148,7 @@
134148
"displayName": "Darwin Debug",
135149
"inherits": "darwin-base",
136150
"cacheVariables": {
137-
"CMAKE_BUILD_TYPE": "Debug",
138-
"OMATH_BUILD_VIA_VCPKG": "ON"
151+
"CMAKE_BUILD_TYPE": "Debug"
139152
}
140153
},
141154
{
@@ -151,8 +164,7 @@
151164
"displayName": "Darwin Release",
152165
"inherits": "darwin-debug",
153166
"cacheVariables": {
154-
"CMAKE_BUILD_TYPE": "Release",
155-
"OMATH_BUILD_VIA_VCPKG": "ON"
167+
"CMAKE_BUILD_TYPE": "Release"
156168
}
157169
}
158170
]

0 commit comments

Comments
 (0)