diff --git a/.gitignore b/.gitignore index 1625cb5fd695..ba6bc318dbbb 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,6 @@ lit.site.cfg.py # External software /ext + +# CMake preset file +CMakeUserPresets.json \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 1953c7bd07a1..f738779772eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -504,9 +504,12 @@ else() # Lookup python either way as some integration tests use python without the # bindings find_package(Python3) - if(Python3_FOUND) - message(STATUS "Found python at ${Python3_EXECUTABLE}") - endif() +endif() + +set(Python3_FIND_VIRTUALENV FIRST) + +if(Python3_FOUND) + message(STATUS "Found python at ${Python3_EXECUTABLE}") endif() #-------------------------------------------------------------------------------