Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
53ec0a16
Unverified
Commit
53ec0a16
authored
Oct 02, 2018
by
Niels Lohmann
Committed by
GitHub
Oct 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1271 from chuckatkins/cleanup-deprecated-warnings
Turn off additional deprecation warnings for GCC.
parents
c8231eff
829571ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
CMakeLists.txt
test/CMakeLists.txt
+12
-14
No files found.
test/CMakeLists.txt
View file @
53ec0a16
...
@@ -96,22 +96,21 @@ foreach(file ${files})
...
@@ -96,22 +96,21 @@ foreach(file ${files})
string
(
REGEX REPLACE
"unit-([^$]+)"
"test-
\\
1"
testcase
${
file_basename
}
)
string
(
REGEX REPLACE
"unit-([^$]+)"
"test-
\\
1"
testcase
${
file_basename
}
)
add_executable
(
${
testcase
}
$<TARGET_OBJECTS:catch_main>
${
file
}
)
add_executable
(
${
testcase
}
$<TARGET_OBJECTS:catch_main>
${
file
}
)
set_target_properties
(
${
testcase
}
PROPERTIES
target_compile_definitions
(
${
testcase
}
PRIVATE
COMPILE_DEFINITIONS
"$<$<CXX_COMPILER_ID:MSVC>:_SCL_SECURE_NO_WARNINGS>"
CATCH_CONFIG_FAST_COMPILE
COMPILE_OPTIONS
"$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>"
$<$<CXX_COMPILER_ID:MSVC>:_SCL_SECURE_NO_WARNINGS>
)
target_compile_options
(
${
testcase
}
PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-deprecated;-Wno-float-equal>
$<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
)
target_include_directories
(
${
testcase
}
PRIVATE
thirdparty/catch
thirdparty/fifo_map
)
)
target_compile_definitions
(
${
testcase
}
PRIVATE CATCH_CONFIG_FAST_COMPILE
)
target_compile_features
(
${
testcase
}
PRIVATE cxx_std_11
)
target_include_directories
(
${
testcase
}
PRIVATE
"thirdparty/catch"
)
target_include_directories
(
${
testcase
}
PRIVATE
"thirdparty/fifo_map"
)
target_include_directories
(
${
testcase
}
PRIVATE
${
NLOHMANN_JSON_INCLUDE_BUILD_DIR
}
)
target_link_libraries
(
${
testcase
}
${
NLOHMANN_JSON_TARGET_NAME
}
)
target_link_libraries
(
${
testcase
}
${
NLOHMANN_JSON_TARGET_NAME
}
)
if
(
NOT MSVC
)
set_target_properties
(
${
testcase
}
PROPERTIES COMPILE_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-deprecated -Wno-float-equal"
)
endif
()
add_test
(
NAME
"
${
testcase
}
_default"
add_test
(
NAME
"
${
testcase
}
_default"
COMMAND
${
testcase
}
${
CATCH_TEST_FILTER
}
COMMAND
${
testcase
}
${
CATCH_TEST_FILTER
}
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
...
@@ -131,7 +130,6 @@ foreach(file ${files})
...
@@ -131,7 +130,6 @@ foreach(file ${files})
)
)
set_tests_properties
(
"
${
testcase
}
_valgrind"
PROPERTIES LABELS
"valgrind"
)
set_tests_properties
(
"
${
testcase
}
_valgrind"
PROPERTIES LABELS
"valgrind"
)
endif
()
endif
()
endforeach
()
endforeach
()
#############################################################################
#############################################################################
...
...
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