Page MenuHomePhabricator

[LLDB] Fix standalone build with CMake, broken after adding SymbolFile PDB plugin

Authored by Eugene.Zelenko on Mar 9 2016, 4:52 PM.



LLVM and Clang CMakeLists.txt set this policy explicitly.

Diff Detail

Event Timeline

Eugene.Zelenko retitled this revision from to [LLDB] Fix standalone build with CMake, broken after adding SymbolFile PDB plugin.
Eugene.Zelenko updated this object.
Eugene.Zelenko added a reviewer: zturner.
Eugene.Zelenko set the repository for this revision to rL LLVM.
Eugene.Zelenko added a subscriber: lldb-commits.
zturner edited edge metadata.Mar 9 2016, 5:04 PM

I think this should be in lldb/CMakeLists.txt, not in LLDBStandalone.cmake. What do you think?

I didn't work in main CMakeLists.txt.

From other side, policy is not set only in standalone build, so place seems logical for me.

zturner added a subscriber: zturner.Mar 9 2016, 5:15 PM

But in LLVM and clang as well, it's always set in top-level CMakeLists.txt
file, right? But you're saying for some reason that doesn't work in LLDB?

My guess is that project() or cmake_minimum_required() resets policy value set in upper level make file.

Ahh that would make sense. I guess it needs to be set in both places in
that case?

Probably not since in case of non-standalone build LLVM make file should be enough and LLDBStandalone.cmake will be not executed.

But it also has a project() and a cmake_required_version() statement, so if
that is what is causing the policy to be reset in LLDBStandalone, the same
would be true in that case too. Also clang CMakeLists.txt has it as the
top, and it's basically the same as LLDB