Closed wantehchang closed 1 month ago
Here is a variant of this bug. Run the command:
cmake .. -G Ninja -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=OFF -DAVIF_BUILD_TESTS=ON -DAVIF_GTEST=LOCAL
I get these CMake error messages:
-- Configuring done (0.9s)
CMake Error: CMake can not determine linker language for target: aviftest_helpers
CMake Error: CMake can not determine linker language for target: aviftest_helpers_internal
CMake Error: CMake can not determine linker language for target: avifincrtest_helpers
CMake Error: CMake can not determine linker language for target: avifallocationtest
CMake Error: CMake can not determine linker language for target: avifalphanoispetest
...
CMake Error: CMake can not determine linker language for target: avifutilstest
CMake Error: CMake can not determine linker language for target: avify4mtest
-- Generating done (0.0s)
CMake Generate step failed. Build files cannot be regenerated correctly.
The other related error is if everything is compiled as C, repro_avif_decode_fuzzer in the tests still requires C++.
cmake .. -G Ninja -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=OFF -DAVIF_BUILD_TESTS=ON -DAVIF_GTEST=OFF -DAVIF_ENABLE_GTEST=OFF
triggers:
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILE_OBJECT
Steps to reproduce:
On a Linux computer, run the cmake command:
cmake .. -G Ninja -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=OFF -DAVIF_BUILD_TESTS=ON -DAVIF_GTEST=LOCAL -DAVIF_BUILD_APPS=OFF
It fails with these messages:
If I run the cmake command again, it succeeds, and I can build and run the tests (using
ctest
) successfully.If I change
-DAVIF_BUILD_APPS=OFF
to-DAVIF_BUILD_APPS=ON
, it also works.