-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Support "compiling" source file exclusively to .pyc
Introduce the option CTK_COMPILE_PYTHON_SCRIPT_KEEP_ONLY_PYC to support remove `*.py` scripts once the corresponding `.pyc` file has been generated in the destination directory. Update `_ctk_add_compile_python_directories_target` to accept `keep_only_pyc` argument. Update CMake function `ctkFunctionAddCompilePythonScriptTargets` to accept the `KEEP_ONLY_PYC` option and call `_ctk_add_compile_python_directories_target` accordingly. Update CMake macro `ctkMacroCompilePythonScript` to call `ctkFunctionAddCompilePythonScriptTargets` passing KEEP_ONLY_PYC based on the value of `CTK_COMPILE_PYTHON_SCRIPT_KEEP_ONLY_PYC`. Address warning when using CMake >= 3.13, setting CMP0077 to NEW. See https://cmake.org/cmake/help/latest/policy/CMP0077.html Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>
- Loading branch information
Showing
3 changed files
with
31 additions
and
22 deletions.
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
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