In CMake 3.14, `check_cxx_source_compiles` does not respect all the toolchain variables.
Since cmake 3.14, the check_cxx_source_compiles
does not respect all the toolchain variables causing various checks to fail even if the actual compilation succeeds. To reproduce, download the repository https://github.com/sutarwadi/cmake3.14regression and follow the instructions in the README.md. I am using a custom toolchain file which is attached in the repository as compiler.cmake
file.
I've attached the logs and the shell output below. In my opinion, the interesting thing to look at here is line 8 in CMakeError.log where you can see that the include directories options are not appended to the compiler command which results in the failure.
EDIT: I have now also attached output for the same for cmake3.13.4 below, wherein one can see in line 722 that all the commands are passed on resulting in successful compilation.