fix out-of-source builds with cmake (#7946)

This commit is contained in:
Derek Bailey
2023-05-09 20:33:54 -07:00
committed by GitHub
parent 368428cb94
commit 76f5e9816a
4 changed files with 28 additions and 9 deletions

View File

@@ -1670,12 +1670,7 @@ int FlatBufferTests(const std::string &tests_data_path) {
} // namespace flatbuffers
int main(int argc, const char *argv[]) {
std::string tests_data_path =
#ifdef BAZEL_TEST_DATA_PATH
"../com_github_google_flatbuffers/tests/";
#else
"tests/";
#endif
std::string tests_data_path = "tests/";
for (int argi = 1; argi < argc; argi++) {
std::string arg = argv[argi];