Page MenuHomePhabricator

[CMake] Move project() call to main CMake file
ClosedPublic

Authored by hhb on Jul 26 2019, 6:29 PM.

Details

Summary

The main CMake file don't have a project() call. In this case, cmake will run a dummy project(Project ) at the very beginning. Even before cmake_minimum_required. And a series of compiler detections will be triggered.

This is problematic if we depends on some policy to be set. E.g. CMP0056. try_compile will fail before we have a chance to do anything.

Diff Detail

Repository
rL LLVM

Event Timeline

hhb created this revision.Jul 26 2019, 6:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2019, 6:29 PM
JDevlieghere accepted this revision.Jul 27 2019, 2:32 PM
This revision is now accepted and ready to land.Jul 27 2019, 2:32 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2019, 4:09 PM