Build error caused by overwriting CMAKE_CXX_COMPILER #2343
Labels
kind: bug
release item: 🐛 bug fix
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Milestone
Building unit tests with a combination of CMake and MSVC fails when selecting generators other than Visual Studio Project (ie. NMake, Ninja). The build failure is due to
CMAKE_CXX_COMPILER
being overwritten.json/cmake/download_test_data.cmake
Lines 49 to 54 in db78ac1
I would be happy to open a PR, but I do not understand the intent of the block of code that causes the problem. My first thought is to remove the entire block of code. If the message printed at the end is important, CMake already provides
CMAKE_CXX_COMPILER_ID
andCMAKE_CXX_COMPILER_VERSION
. There's no need to reinvent the wheel.What is the issue you have?
Can't build unit test, see above.
Please describe the steps to reproduce the issue.
Can you provide a small but working code example?
No.
What is the expected behavior?
Project gets built.
And what is the actual behavior instead?
Build fails.
Which compiler and operating system are you using?
Which version of the library did you use?
develop
branchIf you experience a compilation error: can you compile and run the unit tests?
The text was updated successfully, but these errors were encountered: