Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
elfio mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Third Party Mirrors
elfio mirror
Commits
ef2fa127
Commit
ef2fa127
authored
2 years ago
by
Serge Lamikhov-Center
Browse files
Options
Downloads
Patches
Plain Diff
Add elfio_fuzzer to tests' compilation
parent
9d6984a5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/CMakeLists.txt
+27
-8
27 additions, 8 deletions
tests/CMakeLists.txt
with
27 additions
and
8 deletions
tests/CMakeLists.txt
+
27
−
8
View file @
ef2fa127
include
(
FetchContent
)
FetchContent_Declare
(
googletest
URL https://github.com/google/googletest/archive/9a32aee22d771387c494be2d8519fbdf46a713b2.zip
googletest
URL https://github.com/google/googletest/archive/9a32aee22d771387c494be2d8519fbdf46a713b2.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
...
...
@@ -21,7 +21,7 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/elf_examples)
# Second, glob all files under elf_examples
file
(
GLOB elf_examples
LIST_DIRECTORIES
false
false
CONFIGURE_DEPENDS
elf_examples/*
)
...
...
@@ -43,16 +43,35 @@ add_executable(
target_link_libraries
(
ELFIOTest
PRIVATE
elfio::elfio
gtest_main
)
elfio::elfio
gtest_main
)
add_test
(
NAME
ELFIOTest
ELFIOTest
COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/ELFIOTest
${
CMAKE_CURRENT_BINARY_DIR
}
/ELFIOTest
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
${
CMAKE_CURRENT_BINARY_DIR
}
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
)
add_executable
(
elfio_fuzzer
elfio_fuzzer.cpp
)
target_link_libraries
(
elfio_fuzzer
PRIVATE
elfio::elfio
)
target_compile_options
(
elfio_fuzzer
PRIVATE $<$<C_COMPILER_ID:Clang>:-g -O1 -fsanitize=fuzzer>
)
target_link_libraries
(
elfio_fuzzer
PRIVATE $<$<C_COMPILER_ID:Clang>:-fsanitize=fuzzer>
)
endif
()
add_dependencies
(
check ELFIOTest
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment