Adapt tests to new cc_binary file extension on macOS (#834)
As of https://github.com/bazelbuild/bazel/pull/14369, shared libraries produced with cc_binary on macOS with the auto-configured toolchain use the correct file extension for dynamic libraries (.dylib rather than .so). This requires adapting a test.
This commit is contained in:
parent
ebfeaa08f8
commit
40b03b42eb
|
@ -20,7 +20,13 @@ int main(int argc, char* argv[])
|
|||
#ifdef _WIN32
|
||||
test_opening_file(".\\cmake_with_data\\lib_b\\lib_b.dll");
|
||||
#else
|
||||
// Shared libraries used to have the .so file extension on macOS.
|
||||
// See https://github.com/bazelbuild/bazel/pull/14369.
|
||||
try {
|
||||
test_opening_file("./cmake_with_data/lib_b/liblib_b.so");
|
||||
} catch (std::runtime_error& e) {
|
||||
test_opening_file("./cmake_with_data/lib_b/liblib_b.dylib");
|
||||
}
|
||||
#endif
|
||||
std::cout << "Everything's fine!";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue