Simplify CMake build files. PiperOrigin-RevId: 764548411
diff --git a/CMakeLists.txt b/CMakeLists.txt index e38c072..0d5c514 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -52,13 +52,9 @@ include(cmake/FuzzTestHelpers.cmake) include(cmake/CompatibilityModeLinkLibFuzzer.cmake) -include_directories(${re2_SOURCE_DIR}) - if (FUZZTEST_BUILD_TESTING) enable_testing() -endif () -if (FUZZTEST_BUILD_TESTING) set(protobuf_PROTOC_EXE "${protobuf_BINARY_DIR}/protoc") include(${protobuf_SOURCE_DIR}/cmake/protobuf-generate.cmake) endif () @@ -71,6 +67,7 @@ add_subdirectory(grammar_codegen) add_subdirectory(grammar_codegen/generated_antlr_parser) add_subdirectory(tools) + if (FUZZTEST_BUILD_TESTING) add_subdirectory(domain_tests) add_subdirectory(e2e_tests)
diff --git a/domain_tests/CMakeLists.txt b/domain_tests/CMakeLists.txt index d7f5088..e963ffd 100644 --- a/domain_tests/CMakeLists.txt +++ b/domain_tests/CMakeLists.txt
@@ -1,8 +1,3 @@ -get_filename_component(PARENT_DIR ../ ABSOLUTE) -include_directories(${PARENT_DIR}) - -include_directories(${CMAKE_BINARY_DIR}) - fuzztest_cc_test( NAME aggregate_combinators_test
diff --git a/e2e_tests/CMakeLists.txt b/e2e_tests/CMakeLists.txt index 75a1eb9..e95c990 100644 --- a/e2e_tests/CMakeLists.txt +++ b/e2e_tests/CMakeLists.txt
@@ -1,5 +1,3 @@ -get_filename_component(PARENT_DIR ../ ABSOLUTE) -include_directories(${PARENT_DIR}) fuzztest_cc_library( NAME
diff --git a/e2e_tests/testdata/CMakeLists.txt b/e2e_tests/testdata/CMakeLists.txt index 4fedf20..3931793 100644 --- a/e2e_tests/testdata/CMakeLists.txt +++ b/e2e_tests/testdata/CMakeLists.txt
@@ -1,7 +1,3 @@ -get_filename_component(PARENT_DIR ../ ABSOLUTE) -include_directories(${PARENT_DIR}) - -include_directories(${CMAKE_BINARY_DIR}) add_executable( fuzz_tests_for_microbenchmarking fuzz_tests_for_microbenchmarking.cc
diff --git a/fuzztest/CMakeLists.txt b/fuzztest/CMakeLists.txt index 62a854a..7d191f7 100644 --- a/fuzztest/CMakeLists.txt +++ b/fuzztest/CMakeLists.txt
@@ -12,9 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -get_filename_component(PARENT_DIR ../ ABSOLUTE) -include_directories(${PARENT_DIR}) - if (NOT COMPILER_GCC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize-coverage=0") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize-coverage=0")
diff --git a/grammar_codegen/CMakeLists.txt b/grammar_codegen/CMakeLists.txt index bf430bb..09f7d85 100644 --- a/grammar_codegen/CMakeLists.txt +++ b/grammar_codegen/CMakeLists.txt
@@ -1,5 +1,3 @@ -get_filename_component(PARENT_DIR ../ ABSOLUTE) -include_directories(${PARENT_DIR}) add_library( grammar_info