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
af990907
Commit
af990907
authored
Oct 16, 2017
by
Jamie Seward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable warning C4389: '==': signed/unsigned mismatch
Lots of tests have this warning. Also moved out of for loop, doesn't need to be done every loop.
parent
8ba7f69a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
CMakeLists.txt
test/CMakeLists.txt
+13
-10
No files found.
test/CMakeLists.txt
View file @
af990907
...
@@ -66,6 +66,19 @@ set_target_properties(catch_main PROPERTIES
...
@@ -66,6 +66,19 @@ set_target_properties(catch_main PROPERTIES
)
)
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
if
(
MSVC
)
# Force to always compile with W4
if
(
CMAKE_CXX_FLAGS MATCHES
"/W[0-4]"
)
string
(
REGEX REPLACE
"/W[0-4]"
"/W4"
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
"
)
else
()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/W4"
)
endif
()
# Disable warning C4389: '==': signed/unsigned mismatch
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/wd4389"
)
endif
()
#############################################################################
#############################################################################
# one executable for each unit test file
# one executable for each unit test file
#############################################################################
#############################################################################
...
@@ -91,16 +104,6 @@ foreach(file ${files})
...
@@ -91,16 +104,6 @@ foreach(file ${files})
set_target_properties
(
${
testcase
}
PROPERTIES COMPILE_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-deprecated -Wno-float-equal"
)
set_target_properties
(
${
testcase
}
PROPERTIES COMPILE_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-deprecated -Wno-float-equal"
)
endif
()
endif
()
# https://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake
if
(
MSVC
)
# Force to always compile with W4
if
(
CMAKE_CXX_FLAGS MATCHES
"/W[0-4]"
)
string
(
REGEX REPLACE
"/W[0-4]"
"/W4"
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
"
)
else
()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/W4"
)
endif
()
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
}
...
...
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