File tree 3 files changed +41
-11
lines changed
3 files changed +41
-11
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,13 @@ jobs:
41
41
run : ./vcpkg install gsl:x64-linux gtest:x64-linux benchmark:x64-linux fmt:x64-linux
42
42
43
43
- name : Configure CMake
44
- run : cmake --preset linux-${{env.BUILD_TYPE_LOWERCASE}} -S ${{github.workspace}}/cpp-algorithm -B ${{github.workspace}}/cpp-algorithm/out/build/linux-x64-${{env.BUILD_TYPE_LOWERCASE}}
44
+ working-directory : ${{github.workspace}}/cpp-algorithm
45
+ run : make configure
45
46
46
47
- name : Build
47
- working-directory : ${{github.workspace}}/cpp-algorithm/out/build/linux-x64-${{env.BUILD_TYPE_LOWERCASE}}
48
- run : cmake -- build . --config ${{env.BUILD_TYPE}} --target all --parallel 6
48
+ working-directory : ${{github.workspace}}/cpp-algorithm
49
+ run : make build
49
50
50
51
- name : Test
51
- working-directory : ${{github.workspace}}/cpp-algorithm/out/build/linux-x64-${{env.BUILD_TYPE_LOWERCASE}}
52
- run : ctest -C ${{env.BUILD_TYPE}} --output-on-failure
52
+ working-directory : ${{github.workspace}}/cpp-algorithm
53
+ run : make test
Original file line number Diff line number Diff line change @@ -128,10 +128,5 @@ fabric.properties
128
128
.idea /
129
129
.vs /
130
130
.vscode /
131
- out /
132
- cmake-build-debug /
133
- cmake-build-debug-visual-studio /
134
- cmake-build-release /
135
- cmake-build-release-visual-studio /
136
- Folder.DotSettings.user
137
131
README_link.md
132
+ ! /Makefile
Original file line number Diff line number Diff line change
1
+ BUILD_TYPE: =debug
2
+
3
+ UNAME_S: =$(shell uname -s)
4
+ ifeq ($(UNAME_S ) ,Linux)
5
+ PRESET_NAME:=linux-$(BUILD_TYPE)
6
+ else ifeq ($(UNAME_S),Darwin)
7
+ PRESET_NAME:=macos-$(BUILD_TYPE)
8
+ else ifeq ($(UNAME_S),Windows_NT)
9
+ PRESET_NAME:=windows-$(BUILD_TYPE)
10
+ else
11
+ $(error Unsupported platform: $(UNAME_S))
12
+ endif
13
+
14
+ BUILD_DIR: =$(PWD ) /out/build/$(PRESET_NAME )
15
+
16
+ .PHONY : default
17
+ default :
18
+ @echo " Please specify the target"
19
+
20
+ .PHONY : clean
21
+ clean :
22
+ rm -rf $(BUILD_DIR )
23
+
24
+ .PHONY : configure
25
+ configure :
26
+ cmake --preset $(PRESET_NAME )
27
+
28
+ .PHONY : build
29
+ build :
30
+ cmake --build $(BUILD_DIR ) --target all --parallel 6
31
+
32
+ .PHONY : test
33
+ test :
34
+ ctest --test-dir $(BUILD_DIR )
You can’t perform that action at this time.
0 commit comments