File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 58
58
runs-on : ubuntu-24.04
59
59
env :
60
60
CXX_STANDARD : ' 17'
61
+ CMAKE_VERSION : ' 3.14.0'
61
62
BUILD_TYPE : ' Debug'
62
63
steps :
63
64
- name : Harden the runner (Audit all outbound calls)
70
71
- name : setup
71
72
run : |
72
73
sudo -E ./ci/setup_ci_environment.sh
74
+ sudo -E ./ci/setup_cmake.sh
73
75
- name : install dependencies
74
76
run : |
75
77
sudo -E apt-get update
Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ if(NOT nlohmann_json_FOUND)
35
35
# Set the nlohmann_json_VERSION variable from the git tag.
36
36
string (REGEX REPLACE "^v([0-9]+\\ .[0-9]+\\ .[0-9]+)$" "\\ 1" nlohmann_json_VERSION "${nlohmann-json_GIT_TAG}" )
37
37
38
- #Disable iwyu and clang-tidy
39
- if (TARGET nlohmann_json )
38
+ # Disable iwyu and clang-tidy only if the CMake version is greater or equal to 3.19.
39
+ # CMake 3.19+ is needed to set the iwyu and clang-tidy properties on the INTERFACE target
40
+ if (TARGET nlohmann_json AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.19" )
40
41
set_target_properties (nlohmann_json PROPERTIES CXX_INCLUDE_WHAT_YOU_USE ""
41
42
CXX_CLANG_TIDY "" )
42
43
endif ()
You can’t perform that action at this time.
0 commit comments