Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils-sfg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils-sfg
Commits
c1058bdb
Commit
c1058bdb
authored
3 months ago
by
Christoph Alt
Browse files
Options
Downloads
Patches
Plain Diff
also calling cmake make-find-module on custom python venvs
parent
cd06d247
No related branches found
No related tags found
1 merge request
!20
Adding option to automatically installation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
standalone/CMakeLists.txt
+11
-11
11 additions, 11 deletions
standalone/CMakeLists.txt
with
11 additions
and
11 deletions
standalone/CMakeLists.txt
+
11
−
11
View file @
c1058bdb
...
@@ -54,20 +54,20 @@ if (CODEGEN_PRIVATE_VENV)
...
@@ -54,20 +54,20 @@ if (CODEGEN_PRIVATE_VENV)
message
(
WARNING
"Could not find
${
CODEGEN_VENV_REQUIREMENTS
}
"
)
message
(
WARNING
"Could not find
${
CODEGEN_VENV_REQUIREMENTS
}
"
)
endif
()
endif
()
# get the find pystencils-sfg file
execute_process
(
COMMAND
${
PystencilsSfg_PYTHON_INTERPRETER
}
-m pystencilssfg cmake make-find-module
WORKING_DIRECTORY
${
CMAKE_FIND_PACKAGE_REDIRECTS_DIR
}
)
# renaming it
file
(
RENAME
${
CMAKE_FIND_PACKAGE_REDIRECTS_DIR
}
/FindPystencilsSfg.cmake
${
CMAKE_FIND_PACKAGE_REDIRECTS_DIR
}
/pystencilssfg-config.cmake
)
# Find it
find_package
(
PystencilsSfg REQUIRED
)
set
(
_sfg_private_venv_done TRUE CACHE BOOL
""
)
set
(
_sfg_private_venv_done TRUE CACHE BOOL
""
)
mark_as_advanced
(
_sfg_private_venv_done
)
mark_as_advanced
(
_sfg_private_venv_done
)
endif
()
endif
()
set
(
_sfg_cache_python_init
${
_venv_python_exe
}
)
set
(
_sfg_cache_python_init
${
_venv_python_exe
}
)
set
(
PystencilsSfg_PYTHON_INTERPRETER
${
_sfg_cache_python_init
}
CACHE PATH
"Path to the Python executable used to run pystencils-sfg"
)
set
(
PystencilsSfg_PYTHON_INTERPRETER
${
_sfg_cache_python_init
}
CACHE PATH
"Path to the Python executable used to run pystencils-sfg"
)
endif
()
endif
()
# get the find pystencils-sfg file
execute_process
(
COMMAND
${
PystencilsSfg_PYTHON_INTERPRETER
}
-m pystencilssfg cmake make-find-module
WORKING_DIRECTORY
${
CMAKE_FIND_PACKAGE_REDIRECTS_DIR
}
)
# renaming it
file
(
RENAME
${
CMAKE_FIND_PACKAGE_REDIRECTS_DIR
}
/FindPystencilsSfg.cmake
${
CMAKE_FIND_PACKAGE_REDIRECTS_DIR
}
/pystencilssfg-config.cmake
)
# Find it
find_package
(
PystencilsSfg REQUIRED
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment