-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct CMake Logic and update cpplint to Python3 #117
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c90bbd9
Update cpplint to python3 compatible-version
mjcarroll ef66797
Find Python3 if available
mjcarroll ed595cb
Split targets but maintain codecheck
mjcarroll 084ab9a
Update cmake/IgnPython.cmake
mjcarroll ebc2fca
Add Ignition-specific default filters and suppressions
mjcarroll 3785150
Don't do C+11 checks
mjcarroll 32c7f59
Add permalink
mjcarroll File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2020 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Copied from ament/ament_cmake: ament_cmake/ament_cmake_core/cmake/core/python.cmake | ||
|
||
set(PYTHON_VERSION "" CACHE STRING | ||
"Specify specific Python version to use ('major.minor' or 'major')") | ||
|
||
# if not specified otherwise use Python 3 | ||
if(NOT PYTHON_VERSION) | ||
set(PYTHON_VERSION "3") | ||
endif() | ||
|
||
find_package(PythonInterp ${PYTHON_VERSION} REQUIRED) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this mean
python
is now a required dependency ofignition-cmake2
? the homebrew bottle build of 2.6.0 in osrf/homebrew-simulation#1222 is failinghttps://build.osrfoundation.org/job/generic-release-homebrew_triggered_bottle_builder/label=osx_mojave/124/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might want this to be
QUIET
instead ofREQUIRED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is what this line implies, although I'm not sure if we meant to create this dependency or not.
If we do need python though, what would the implications be of replacing
REQUIRED
withQUIET
? I'm wondering if marking thisQUIET
can cause issues elsewhere if python is not found. @mjcarroll, what are your thoughts?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's an optional dependency that's only needed for optional modules (e.g. testing?), then whatever modules depend on it should check
${PythonInterp_FOUND}
to conditionally build only if this package was found. If the package was found, then the module should skip being built.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can continue the discussion in #132, which proposes to revert python3 to an optional dependency