Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
826e9f25
Commit
826e9f25
authored
Nov 11, 2020
by
Marius Brehler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor finding python
Use `find_package(Python ..)` if available, instead of the deprecated `find_package(PythonInterp)` CMake module.
parent
035de8c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
internal_utils.cmake
googletest/cmake/internal_utils.cmake
+7
-1
No files found.
googletest/cmake/internal_utils.cmake
View file @
826e9f25
...
@@ -244,7 +244,13 @@ function(cxx_executable name dir libs)
...
@@ -244,7 +244,13 @@ function(cxx_executable name dir libs)
endfunction
()
endfunction
()
# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
find_package
(
PythonInterp
)
if
(
"
${
CMAKE_VERSION
}
"
VERSION_LESS
"3.12.0"
)
find_package
(
PythonInterp
)
else
()
find_package
(
Python COMPONENTS Interpreter
)
set
(
PYTHONINTERP_FOUND
${
Python_Interpreter_FOUND
}
)
set
(
PYTHON_EXECUTABLE
${
Python_EXECUTABLE
}
)
endif
()
# cxx_test_with_flags(name cxx_flags libs srcs...)
# cxx_test_with_flags(name cxx_flags libs srcs...)
#
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment