File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -5,16 +5,9 @@ set(CMAKE_CXX_STANDARD 20)
55set (CMAKE_CXX_STANDARD_REQUIRED True )
66set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR} /bin)
77
8- # Update submodules
9- include (cmake/UpdateSubmodules.cmake)
10-
118# Include directories
129include_directories (${CMAKE_SOURCE_DIR} /src)
1310
14- # CTest - GoogleTest
15- include (CTest)
16- add_subdirectory (external/googletest EXCLUDE_FROM_ALL )
17-
1811# Main executable
1912add_executable (taskr src/main.cpp)
2013
@@ -23,6 +16,13 @@ add_executable(taskr src/main.cpp)
2316# Disable testing: cmake -B build -S . -DBUILD_TESTING=OFF
2417# Enable testing: cmake -B build -S . -DBUILD_TESTING=ON
2518if (BUILD_TESTING)
19+ # Update submodules
20+ include (cmake/UpdateSubmodules.cmake)
21+ # CTest - GoogleTest
22+ include (CTest)
23+ add_subdirectory (external/googletest EXCLUDE_FROM_ALL )
24+
25+
2626 add_executable (taskr_tests
2727 tests/test .cpp
2828 tests/test_errors.cpp
Original file line number Diff line number Diff line change 1+ task _build_dir:
2+ run = mkdir -p build
3+
4+ task clean:
5+ run = rm -rf build bin .cache
6+ desc = cleans directories
7+
18task generate:
29 run = cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_TESTING=ON
310 desc = generates build files with testing
411 alias = g
12+ needs = clean, _build_dir
513
614task generate_r:
715 run = cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
816 desc = generates with release flag and without testing
17+ needs = clean, _build_dir
918
1019task build:
1120 run = cmake --build build -j
@@ -19,13 +28,8 @@ task test:
1928 alias = t
2029
2130task install:
22- run = sudo cmake --install build
23- desc = installs the taskr binary
24- needs = generate, build
25- alias = i
26-
27- task install_r:
2831 run = sudo cmake --install build
2932 desc = installs the taskr release binary
3033 needs = generate_r, build
31- alias = ir
34+ alias = i
35+
You can’t perform that action at this time.
0 commit comments