-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 Misc. code quality improvements (#547)
## Description This PR brings in a couple code quality improvements discovered when working on #538. ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines.
- Loading branch information
Showing
3 changed files
with
47 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
pybind11_add_module( | ||
# Name of the extension | ||
_core | ||
# Prefer thin LTO if available | ||
THIN_LTO | ||
# Optimize the bindings for size | ||
OPT_SIZE | ||
# Source code goes here | ||
${MQT_CORE_INCLUDE_BUILD_DIR}/python/pybind11.hpp | ||
module.cpp | ||
register_operations.cpp | ||
register_permutation.cpp | ||
register_symbolic.cpp | ||
register_quantum_computation.cpp | ||
operations/register_optype.cpp | ||
operations/register_control.cpp | ||
operations/register_operation.cpp | ||
operations/register_standard_operation.cpp | ||
operations/register_classic_controlled_operation.cpp | ||
operations/register_compound_operation.cpp | ||
operations/register_non_unitary_operation.cpp | ||
operations/register_symbolic_operation.cpp | ||
symbolic/register_variable.cpp | ||
symbolic/register_term.cpp | ||
symbolic/register_expression.cpp) | ||
target_link_libraries(_core PRIVATE MQT::Core MQT::ProjectOptions MQT::ProjectWarnings) | ||
if(NOT TARGET _core) | ||
pybind11_add_module( | ||
# Name of the extension | ||
_core | ||
# Prefer thin LTO if available | ||
THIN_LTO | ||
# Optimize the bindings for size | ||
OPT_SIZE | ||
# Source code goes here | ||
${MQT_CORE_INCLUDE_BUILD_DIR}/python/pybind11.hpp | ||
module.cpp | ||
register_operations.cpp | ||
register_permutation.cpp | ||
register_symbolic.cpp | ||
register_quantum_computation.cpp | ||
operations/register_optype.cpp | ||
operations/register_control.cpp | ||
operations/register_operation.cpp | ||
operations/register_standard_operation.cpp | ||
operations/register_classic_controlled_operation.cpp | ||
operations/register_compound_operation.cpp | ||
operations/register_non_unitary_operation.cpp | ||
operations/register_symbolic_operation.cpp | ||
symbolic/register_variable.cpp | ||
symbolic/register_term.cpp | ||
symbolic/register_expression.cpp) | ||
target_link_libraries(_core PRIVATE MQT::Core MQT::ProjectOptions MQT::ProjectWarnings) | ||
|
||
# Install directive for scikit-build-core | ||
install( | ||
TARGETS _core | ||
DESTINATION . | ||
COMPONENT MQTCorePythonModule) | ||
# Install directive for scikit-build-core | ||
install( | ||
TARGETS _core | ||
DESTINATION . | ||
COMPONENT MQTCorePythonModule) | ||
endif() |