File tree 3 files changed +16
-17
lines changed
3 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -104,17 +104,17 @@ for instance.
104
104
### Tooling installation
105
105
- ` pre-commit ` , as a Python tool, can be installed with:
106
106
107
- - ` pipx `
107
+ + `pipx`
108
108
109
- pipx install pre-commit
109
+ pipx install pre-commit
110
110
111
- - ` pip ` (or ` pip3 ` on Debian-like distribution)
111
+ + ` pip ` (or ` pip3 ` on Debian-like distribution)
112
112
113
- pip install -U pre-commit
113
+ pip install -U pre-commit
114
114
115
- - ` snap ` (system-wide)
115
+ + ` snap ` (system-wide)
116
116
117
- sudo snap install pre-commit
117
+ sudo snap install pre-commit
118
118
119
119
and perhaps from your distribution package manager.
120
120
Original file line number Diff line number Diff line change @@ -48,6 +48,15 @@ else()
48
48
message (STATUS "Tools version: ${TOOLS_VERSION} " )
49
49
endif ()
50
50
51
+ # ------------------------------------------------------------------------------------ #
52
+ # Set default C++ standard to C++17
53
+ set (CMAKE_CXX_STANDARD 17)
54
+ # set(CMAKE_CXX_STANDARD_REQUIRED True)
55
+ # Set warnings
56
+ set (CMAKE_CXX_FLAGS
57
+ "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-long-long -Wno-vla"
58
+ )
59
+
51
60
# ------------------------------------------------------------------------------------ #
52
61
# Set compilation version
53
62
if (CMAKE_BUILD_TYPE MATCHES "Debug" )
@@ -128,16 +137,6 @@ if(USE_ROOT)
128
137
include_directories (SYSTEM ${ROOT_INCLUDE_DIRS} )
129
138
endif (USE_ROOT)
130
139
131
- # ------------------------------------------------------------------------------------ #
132
- # Set compiler option Set C++ 17 if not already set
133
- if (NOT CMAKE_CXX_FLAGS MATCHES "-std=c\\ +\\ +" )
134
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17" )
135
- endif ()
136
- # Set warnings
137
- set (CMAKE_CXX_FLAGS
138
- "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-long-long -Wno-vla"
139
- )
140
-
141
140
# ------------------------------------------------------------------------------------ #
142
141
# Set the headers directory
143
142
include_directories (${PROJECT_SOURCE_DIR} /inc ${PROJECT_BINARY_DIR} )
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ get_filename_component(TOOLS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
15
15
# ------------------------------------------------------------------------------------ #
16
16
# Provide *recommended* compiler flags used by this build of Tools. Don't mess with the
17
17
# actual CMAKE_CXX_FLAGS!!! It's up to the user what to do with these.
18
- set (TOOLS_CXX_FLAGS " -std=c++17" )
18
+ set (TOOLS_CXX_FLAGS "-std=c++17" )
19
19
20
20
# ------------------------------------------------------------------------------------ #
21
21
# Configure the path to the headers
You can’t perform that action at this time.
0 commit comments