This is an archive of the discontinued LLVM Phabricator instance.

Make CMake display more readable paths to Python binaries on Windows

Authored by enlight on Oct 7 2015, 10:40 AM.



Previously CMake would display messages like these:

-- LLDB Found PythonExecutable: $<$<CONFIG:Debug>:C:/Projects/Python-2.7.9-bin/x64/python_d.exe>$<$<NOT:$<CONFIG:Debug>>:C:/Projects/Python-2.7.9-bin/x64/python.exe>
-- LLDB Found PythonLibs: $<$<CONFIG:Debug>:C:/Projects/Python-2.7.9-bin/x64/libs/python27_d.lib>$<$<NOT:$<CONFIG:Debug>>:C:/Projects/Python-2.7.9-bin/x64/libs/python27.lib>
-- LLDB Found PythonDLL: $<$<CONFIG:Debug>:C:/Projects/Python-2.7.9-bin/x64/python27_d.dll>$<$<NOT:$<CONFIG:Debug>>:C:/Projects/Python-2.7.9-bin/x64/python27.dll>

This patch makes the messages look like this:

-- LLDB Found PythonExecutable: C:/Projects/Python-2.7.9-bin/x64/python.exe and C:/Projects/Python-2.7.9-bin/x64/python_d.exe
-- LLDB Found PythonLibs: C:/Projects/Python-2.7.9-bin/x64/libs/python27.lib and C:/Projects/Python-2.7.9-bin/x64/libs/python27_d.lib
-- LLDB Found PythonDLL: C:/Projects/Python-2.7.9-bin/x64/python27.dll and C:/Projects/Python-2.7.9-bin/x64/python27_d.dll

I've also added checks to ensure the messages are actually accurate, as in check that the files actually exist before claiming they've been found. If any of the files are missing Python integration will be disabled for the build.

Diff Detail


Event Timeline

enlight updated this revision to Diff 36764.Oct 7 2015, 10:40 AM
enlight retitled this revision from to Make CMake display more readable paths to Python binaries on Windows.
enlight updated this object.
enlight added reviewers: zturner, brucem.
enlight set the repository for this revision to rL LLVM.
enlight added a subscriber: lldb-commits.
zturner edited edge metadata.Oct 7 2015, 10:43 AM

Looks good, thanks.

zturner accepted this revision.Oct 7 2015, 10:43 AM
zturner edited edge metadata.
This revision is now accepted and ready to land.Oct 7 2015, 10:43 AM
This revision was automatically updated to reflect the committed changes.