When this policy is enabled, CMake honors link flags in try_compile().
This is useful when cross-compiling since the CMake checks will use
the value of CMAKE_EXE_LINKER_FLAGS when linking the test executables.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Hmm, I'd done this as part of https://reviews.llvm.org/D39431, but then https://reviews.llvm.org/D50407 erroneously removed it.
Comment Actions
Actually, this might not be needed? https://cmake.org/cmake/help/v3.4/manual/cmake-policies.7.html says
The cmake_minimum_required() command does more than report an error if a too-old version of CMake is used to build a project. It also sets all policies introduced in that CMake version or earlier to NEW behavior.
Comment Actions
Indeed, the cmake_minimum_required command sets policies to new.
It is still possible that there is another use of cmake_minimum_required in the buildsystem somewhere (which would be an error if reachable from this one).
Anyway, it seems that this patch should not be applied.