Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
8eb7db72
Unverified
Commit
8eb7db72
authored
Mar 10, 2019
by
Niels Lohmann
Committed by
GitHub
Mar 10, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1441 from iwanders/support-cmake-older-than-3-8-with-if
Use C++11 features supported by CMake 3.1.
parents
393410e6
4fd9b52f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
CMakeLists.txt
CMakeLists.txt
+5
-1
benchmarks/CMakeLists.txt
benchmarks/CMakeLists.txt
+1
-1
test/CMakeLists.txt
test/CMakeLists.txt
+5
-1
No files found.
CMakeLists.txt
View file @
8eb7db72
...
@@ -46,7 +46,11 @@ endif()
...
@@ -46,7 +46,11 @@ endif()
##
##
add_library
(
${
NLOHMANN_JSON_TARGET_NAME
}
INTERFACE
)
add_library
(
${
NLOHMANN_JSON_TARGET_NAME
}
INTERFACE
)
add_library
(
${
PROJECT_NAME
}
::
${
NLOHMANN_JSON_TARGET_NAME
}
ALIAS
${
NLOHMANN_JSON_TARGET_NAME
}
)
add_library
(
${
PROJECT_NAME
}
::
${
NLOHMANN_JSON_TARGET_NAME
}
ALIAS
${
NLOHMANN_JSON_TARGET_NAME
}
)
target_compile_features
(
${
NLOHMANN_JSON_TARGET_NAME
}
INTERFACE cxx_std_11
)
if
(
${
CMAKE_VERSION
}
VERSION_LESS
"3.8.0"
)
target_compile_features
(
${
NLOHMANN_JSON_TARGET_NAME
}
INTERFACE cxx_range_for
)
else
()
target_compile_features
(
${
NLOHMANN_JSON_TARGET_NAME
}
INTERFACE cxx_std_11
)
endif
()
target_include_directories
(
target_include_directories
(
${
NLOHMANN_JSON_TARGET_NAME
}
${
NLOHMANN_JSON_TARGET_NAME
}
...
...
benchmarks/CMakeLists.txt
View file @
8eb7db72
cmake_minimum_required
(
VERSION 3.
1
)
cmake_minimum_required
(
VERSION 3.
8
)
project
(
JSON_Benchmarks LANGUAGES CXX
)
project
(
JSON_Benchmarks LANGUAGES CXX
)
# set compiler flags
# set compiler flags
...
...
test/CMakeLists.txt
View file @
8eb7db72
...
@@ -64,7 +64,11 @@ set_target_properties(catch_main PROPERTIES
...
@@ -64,7 +64,11 @@ set_target_properties(catch_main PROPERTIES
COMPILE_DEFINITIONS
"$<$<CXX_COMPILER_ID:MSVC>:_SCL_SECURE_NO_WARNINGS>"
COMPILE_DEFINITIONS
"$<$<CXX_COMPILER_ID:MSVC>:_SCL_SECURE_NO_WARNINGS>"
COMPILE_OPTIONS
"$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>"
COMPILE_OPTIONS
"$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>"
)
)
target_compile_features
(
catch_main PUBLIC cxx_std_11
)
if
(
${
CMAKE_VERSION
}
VERSION_LESS
"3.8.0"
)
target_compile_features
(
catch_main PUBLIC cxx_range_for
)
else
()
target_compile_features
(
catch_main PUBLIC cxx_std_11
)
endif
()
target_include_directories
(
catch_main PRIVATE
"thirdparty/catch"
)
target_include_directories
(
catch_main PRIVATE
"thirdparty/catch"
)
# https://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake
# https://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment