Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardalee committed Dec 7, 2024
1 parent 7a3a789 commit f51aa71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public CCmakeGenerator(

/**
* Set the code generator for the CMake main target.
*
* @param setUpMainTarget
*/
public void setCmakeGenerator(SetUpMainTarget setUpMainTarget) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,13 +647,14 @@ protected void additionalPostProcessingForModes() {
PythonModeGenerator.generateResetReactionsIfNeeded(reactors);
}

public String getCmakeCode(
boolean hasMain, String executableName, Stream<String> cSources) {
public String getCmakeCode(boolean hasMain, String executableName, Stream<String> cSources) {
// According to https://cmake.org/cmake/help/latest/module/FindPython.html#hints, the following
// should work to select the version of Python given in your virtual environment.
// However, this does not work for me (macOS Sequoia 15.0.1).
// As a consequence, the python-version target property can be used to specify the exact Python version.
var pythonVersion = "3.10.0"; // Allows 3.10 or later. Change to "3.10.0...<3.11.0" to require 3.10 by default.
// As a consequence, the python-version target property can be used to specify the exact Python
// version.
var pythonVersion =
"3.10.0"; // Allows 3.10 or later. Change to "3.10.0...<3.11.0" to require 3.10 by default.
if (targetConfig.isSet(PythonVersionProperty.INSTANCE)) {
pythonVersion = targetConfig.get(PythonVersionProperty.INSTANCE) + " EXACT";
}
Expand Down

0 comments on commit f51aa71

Please sign in to comment.