Skip to content

Commit 012756d

Browse files
committed
Updated cmake minimum required to 3.5-4.0
1 parent 306d59d commit 012756d

File tree

4 files changed

+7
-20
lines changed

4 files changed

+7
-20
lines changed

.github/workflows/coverage.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@v3
2020
- name: install depends
2121
run: |
2222
sudo apt-get update

.github/workflows/gha.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
pattern: [0, 1, 2, 3]
1919
steps:
20-
- uses: actions/checkout@v1
20+
- uses: actions/checkout@v3
2121
- name: install gtest
2222
run: |
2323
brew install --force googletest
@@ -173,10 +173,10 @@ jobs:
173173
matrix:
174174
pattern: [0, 1, 2, 3]
175175
steps:
176-
- uses: actions/checkout@v2.0.0
176+
- uses: actions/checkout@v3
177177
- name: Cache vcpkg
178178
id: cache-vcpkg
179-
uses: actions/cache@v1.1.2
179+
uses: actions/cache@v3
180180
with:
181181
path: C:/vcpkg/installed
182182
key: windows-2019-vcpkg-v2

CMakeLists.txt

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
if(${CMAKE_VERSION} VERSION_GREATER "3.4")
2-
CMAKE_MINIMUM_REQUIRED (VERSION 3.5)
3-
else()
4-
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.12)
5-
IF ((CMAKE_VERSION VERSION_GREATER 3.1) OR
6-
(CMAKE_VERSION VERSION_EQUAL 3.1))
7-
CMAKE_POLICY(SET CMP0054 NEW)
8-
ENDIF ()
9-
endif()
10-
11-
IF ((CMAKE_VERSION VERSION_GREATER 3.27) OR
12-
(CMAKE_VERSION VERSION_EQUAL 3.27))
13-
CMAKE_POLICY(SET CMP0145 OLD)
14-
ENDIF ()
1+
CMAKE_MINIMUM_REQUIRED (VERSION 3.5...4.0)
152

163
OPTION (MSGPACK_BUILD_TESTS "Build msgpack tests." OFF)
174
OPTION (MSGPACK_GEN_COVERAGE "Enable running gcov to get a test coverage report." OFF)
@@ -200,11 +187,11 @@ ENDIF ()
200187

201188
IF (MSGPACK_BUILD_TESTS)
202189
ENABLE_TESTING ()
190+
INCLUDE(CTest)
203191
list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
204192
# MEMORYCHECK_COMMAND_OPTIONS needs to place prior to CTEST_MEMORYCHECK_COMMAND
205193
SET (MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --show-leak-kinds=definite,possible --error-exitcode=1")
206194
FIND_PROGRAM(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
207-
INCLUDE(Dart)
208195
ADD_SUBDIRECTORY (test)
209196
ENDIF ()
210197

cmake/CodeCoverage.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
4848

4949
# Show info where to find the report
5050
ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
51-
COMMAND ;
51+
COMMAND ${CMAKE_COMMAND} -E echo ""
5252
COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
5353
)
5454

0 commit comments

Comments
 (0)