Vitaly Buka | 5b1a003 | 2017-02-17 00:06:06 -0800 | [diff] [blame] | 1 | # Copyright 2017 Google Inc. All rights reserved. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Vitaly Buka | 3fcc546 | 2017-07-14 13:32:53 -0700 | [diff] [blame] | 15 | set(EXPAT_CFLAGS "${CMAKE_C_FLAGS} ${FUZZING_FLAGS}") |
| 16 | set(EXPAT_CXXFLAGS "${CMAKE_CXX_FLAGS} ${FUZZING_FLAGS}") |
Vitaly Buka | 5b1a003 | 2017-02-17 00:06:06 -0800 | [diff] [blame] | 17 | include(expat) |
| 18 | |
| 19 | add_executable(expat_example |
| 20 | expat_example.cc) |
| 21 | target_link_libraries(expat_example |
| 22 | protobuf-mutator-xml |
Vitaly Buka | 53dccbe | 2017-10-16 18:27:21 -0700 | [diff] [blame] | 23 | ${LIB_PROTO_MUTATOR_FUZZER_LIBRARIES} |
Vitaly Buka | 5b1a003 | 2017-02-17 00:06:06 -0800 | [diff] [blame] | 24 | ${EXPAT_LIBRARIES}) |
| 25 | set_property(TARGET expat_example |
| 26 | PROPERTY COMPILE_FLAGS ${FUZZING_FLAGS}) |
| 27 | set_property(TARGET expat_example |
Vitaly Buka | 7218a15 | 2017-10-16 16:36:40 -0700 | [diff] [blame] | 28 | PROPERTY LINK_FLAGS ${FUZZING_FLAGS_BINARY}) |
Vitaly Buka | 5b1a003 | 2017-02-17 00:06:06 -0800 | [diff] [blame] | 29 | |
| 30 | add_executable(expat_example_test |
| 31 | expat_example_test.cc) |
| 32 | add_dependencies(expat_example_test expat_example) |
| 33 | target_link_libraries(expat_example_test |
| 34 | ${GTEST_BOTH_LIBRARIES} |
| 35 | ${CMAKE_THREAD_LIBS_INIT}) |
| 36 | add_test(test.expat_example_test expat_example_test --gtest_color=yes AUTO) |
Christian Hartlage | add10cd | 2018-11-16 02:17:16 +0100 | [diff] [blame] | 37 | if(LIB_PROTO_MUTATOR_TESTING) |
| 38 | add_dependencies(check expat_example_test) |
Christian Hartlage | 7853387 | 2018-11-27 16:22:17 +0100 | [diff] [blame] | 39 | endif() |