Skip to content

Commit 3825bbe

Browse files
authored
Update project version to 1.5 (#15)
* update project version to 1.5 * bump other dependencies * rerun code formatters * add .cmake-format
1 parent ae5bb8b commit 3825bbe

12 files changed

Lines changed: 116 additions & 386 deletions

File tree

.cmake-format

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
format:
2+
tab_size: 2
3+
line_width: 100
4+
dangle_parens: true
5+
6+
parse:
7+
additional_commands:
8+
cpmaddpackage:
9+
pargs:
10+
nargs: '*'
11+
flags: []
12+
spelling: CPMAddPackage
13+
kwargs: &cpmaddpackagekwargs
14+
NAME: 1
15+
FORCE: 1
16+
VERSION: 1
17+
GIT_TAG: 1
18+
DOWNLOAD_ONLY: 1
19+
GITHUB_REPOSITORY: 1
20+
GITLAB_REPOSITORY: 1
21+
GIT_REPOSITORY: 1
22+
SVN_REPOSITORY: 1
23+
SVN_REVISION: 1
24+
SOURCE_DIR: 1
25+
DOWNLOAD_COMMAND: 1
26+
FIND_PACKAGE_ARGUMENTS: 1
27+
NO_CACHE: 1
28+
GIT_SHALLOW: 1
29+
URL: 1
30+
URL_HASH: 1
31+
URL_MD5: 1
32+
DOWNLOAD_NAME: 1
33+
DOWNLOAD_NO_EXTRACT: 1
34+
HTTP_USERNAME: 1
35+
HTTP_PASSWORD: 1
36+
OPTIONS: +
37+
cpmfindpackage:
38+
pargs:
39+
nargs: '*'
40+
flags: []
41+
spelling: CPMFindPackage
42+
kwargs: *cpmaddpackagekwargs
43+
packageproject:
44+
pargs:
45+
nargs: '*'
46+
flags: []
47+
spelling: packageProject
48+
kwargs:
49+
NAME: 1
50+
VERSION: 1
51+
NAMESPACE: 1
52+
INCLUDE_DIR: 1
53+
INCLUDE_DESTINATION: 1
54+
BINARY_DIR: 1
55+
COMPATIBILITY: 1
56+
VERSION_HEADER: 1
57+
DEPENDENCIES: +

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v1
19+
- uses: actions/checkout@v4
2020

2121
# https://stackoverflow.com/questions/39332406/install-libc-on-ubuntu
2222
- name: install dependencies

.github/workflows/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020

2121
steps:
22-
- uses: actions/checkout@v1
22+
- uses: actions/checkout@v4
2323

2424
- name: build and install library
2525
run: |

.github/workflows/macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: macos-latest
2020

2121
steps:
22-
- uses: actions/checkout@v1
22+
- uses: actions/checkout@v4
2323

2424
- name: configure
2525
run: cmake -Htest -Bbuild

.github/workflows/style.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v1
19+
- uses: actions/checkout@v4
2020

2121
- name: Install format dependencies
22-
run: pip3 install clang-format==14.0.6
22+
run: pip3 install clang-format==14.0.6 cmake_format==0.6.11 pyyaml
2323

2424
- name: configure
2525
run: cmake -Stest -Bbuild

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- uses: actions/checkout@v1
23+
- uses: actions/checkout@v4
2424

2525
- name: configure
2626
run: cmake -Htest -Bbuild -DENABLE_TEST_COVERAGE=1

.github/workflows/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: windows-latest
2020

2121
steps:
22-
- uses: actions/checkout@v1
22+
- uses: actions/checkout@v4
2323

2424
- name: configure
2525
run: cmake -Htest -Bbuild

CMakeLists.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
22

33
# ---- Project ----
44

5-
project(EasyIterator
6-
VERSION 1.4
5+
project(
6+
EasyIterator
7+
VERSION 1.5
78
LANGUAGES CXX
89
)
910

1011
# ---- Include guards ----
1112

1213
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
13-
message(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there.")
14+
message(
15+
FATAL_ERROR
16+
"In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there."
17+
)
1418
endif()
1519

1620
# ---- Add dependencies via CPM ----
@@ -38,10 +42,9 @@ add_library(EasyIterator INTERFACE)
3842
target_compile_options(EasyIterator INTERFACE "$<$<BOOL:${MSVC}>:/permissive->")
3943
set_target_properties(EasyIterator PROPERTIES INTERFACE_COMPILE_FEATURES cxx_std_17)
4044

41-
target_include_directories(EasyIterator
42-
INTERFACE
43-
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
44-
$<INSTALL_INTERFACE:include/${PROJECT_NAME}-${PROJECT_VERSION}>
45+
target_include_directories(
46+
EasyIterator INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
47+
$<INSTALL_INTERFACE:include/${PROJECT_NAME}-${PROJECT_VERSION}>
4548
)
4649

4750
# ---- Create an installable target ----

benchmark/CMakeLists.txt

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
1-
cmake_minimum_required (VERSION 3.14)
1+
cmake_minimum_required(VERSION 3.14)
22

33
option(EASY_ITERATOR_COMPARE_WITH_ITERTOOLS "benchmark itertools" OFF)
44

55
# ---- create project ----
66

7-
project(EasyIteratorBenchmark
8-
LANGUAGES CXX
9-
)
7+
project(EasyIteratorBenchmark LANGUAGES CXX)
108

119
# ---- Dependencies ----
1210

1311
include(../cmake/CPM.cmake)
1412

15-
CPMAddPackage(
16-
NAME EasyIterator
17-
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..
18-
)
13+
CPMAddPackage(NAME EasyIterator SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
1914

2015
CPMAddPackage(
2116
NAME benchmark
2217
GITHUB_REPOSITORY google/benchmark
2318
VERSION 1.5.0
24-
OPTIONS
25-
"BENCHMARK_ENABLE_TESTING Off"
26-
"BENCHMARK_USE_LIBCXX ON"
19+
OPTIONS "BENCHMARK_ENABLE_TESTING Off" "BENCHMARK_USE_LIBCXX ON"
2720
)
2821

29-
if (benchmark_ADDED)
22+
if(benchmark_ADDED)
3023
# patch benchmark target
3124
set_target_properties(benchmark PROPERTIES CXX_STANDARD 17)
3225
endif()
@@ -38,14 +31,14 @@ CPMAddPackage(
3831
DOWNLOAD_ONLY Yes
3932
)
4033

41-
if (itertools_ADDED)
34+
if(itertools_ADDED)
4235
add_library(itertools INTERFACE)
4336
target_include_directories(itertools INTERFACE ${itertools_SOURCE_DIR})
4437
endif()
4538

4639
# ---- Create standalone executable ----
4740

4841
add_executable(EasyIteratorBenchmark "benchmark.cpp")
49-
set_target_properties(EasyIteratorBenchmark PROPERTIES CXX_STANDARD 17)
42+
set_target_properties(EasyIteratorBenchmark PROPERTIES CXX_STANDARD 17)
5043
target_link_libraries(EasyIteratorBenchmark benchmark itertools EasyIterator)
5144
target_compile_definitions(EasyIteratorBenchmark PRIVATE "COMPARE_WITH_ITERTOOLS=1")

0 commit comments

Comments
 (0)