Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
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
lvzhengyang
git2
Commits
4d2a6839
Commit
4d2a6839
authored
Nov 06, 2021
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: move fuzzer args to the fuzzer's cmake
parent
7b527c12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
15 deletions
+5
-15
CMakeLists.txt
+2
-15
fuzzers/CMakeLists.txt
+3
-0
No files found.
CMakeLists.txt
View file @
4d2a6839
...
@@ -113,14 +113,6 @@ else()
...
@@ -113,14 +113,6 @@ else()
# that uses CMAKE_CONFIGURATION_TYPES and not CMAKE_BUILD_TYPE
# that uses CMAKE_CONFIGURATION_TYPES and not CMAKE_BUILD_TYPE
endif
()
endif
()
IF
(
BUILD_FUZZERS AND NOT USE_STANDALONE_FUZZERS
)
# The actual sanitizer link target will be added when linking the fuzz
# targets.
set
(
CMAKE_REQUIRED_FLAGS
"-fsanitize=fuzzer-no-link"
)
add_c_flag
(
-fsanitize=fuzzer-no-link
)
unset
(
CMAKE_REQUIRED_FLAGS
)
endif
()
#
#
# Subdirectories
# Subdirectories
#
#
...
@@ -137,13 +129,8 @@ if(BUILD_EXAMPLES)
...
@@ -137,13 +129,8 @@ if(BUILD_EXAMPLES)
endif
()
endif
()
if
(
BUILD_FUZZERS
)
if
(
BUILD_FUZZERS
)
if
(
NOT USE_STANDALONE_FUZZERS
)
if
((
BUILD_TESTS OR BUILD_EXAMPLES
)
AND NOT USE_STANDALONE_FUZZERS
)
if
(
BUILD_EXAMPLES
)
message
(
FATAL_ERROR
"Cannot build the fuzzer and the tests or examples together"
)
message
(
FATAL_ERROR
"Cannot build the fuzzer targets and the examples together"
)
endif
()
if
(
BUILD_TESTS
)
message
(
FATAL_ERROR
"Cannot build the fuzzer targets and the tests together"
)
endif
()
endif
()
endif
()
add_subdirectory
(
fuzzers
)
add_subdirectory
(
fuzzers
)
endif
()
endif
()
...
...
fuzzers/CMakeLists.txt
View file @
4d2a6839
...
@@ -3,7 +3,10 @@ include_directories(${LIBGIT2_INCLUDES})
...
@@ -3,7 +3,10 @@ include_directories(${LIBGIT2_INCLUDES})
include_directories
(
SYSTEM
${
LIBGIT2_SYSTEM_INCLUDES
}
)
include_directories
(
SYSTEM
${
LIBGIT2_SYSTEM_INCLUDES
}
)
if
(
BUILD_FUZZERS AND NOT USE_STANDALONE_FUZZERS
)
if
(
BUILD_FUZZERS AND NOT USE_STANDALONE_FUZZERS
)
set
(
CMAKE_REQUIRED_FLAGS
"-fsanitize=fuzzer-no-link"
)
add_c_flag
(
-fsanitize=fuzzer
)
add_c_flag
(
-fsanitize=fuzzer
)
add_c_flag
(
-fsanitize=fuzzer-no-link
)
unset
(
CMAKE_REQUIRED_FLAGS
)
endif
()
endif
()
file
(
GLOB SRC_FUZZ RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
*_fuzzer.c
)
file
(
GLOB SRC_FUZZ RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
*_fuzzer.c
)
...
...
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