This is an archive of the discontinued LLVM Phabricator instance.

Call cmake_minimum_required at the top of CMakeLists.txt
ClosedPublic

Authored by pirama on Jun 16 2017, 9:48 AM.

Details

Summary

Since r298413, the NEW behavior of the CMake policy CMP0056 is followed.
However, it is only effective after the call to cmake_minimum_required.
This causes CMAKE_EXE_LINKER_FLAGS etc. to be unused when CMake tries to
check compilers for languages specified in the 'project' declaration.

Set cmake_minimum_required(VERSION) at the top of the file and ahead of
declaring the project declaration.

Diff Detail

Repository
rL LLVM

Event Timeline

pirama created this revision.Jun 16 2017, 9:48 AM
pirama updated this revision to Diff 102843.Jun 16 2017, 9:50 AM

Update commit message.

beanz accepted this revision.Jun 16 2017, 1:23 PM

LGTM

This revision is now accepted and ready to land.Jun 16 2017, 1:23 PM
This revision was automatically updated to reflect the committed changes.

Thanks for the LGTM!