diff --git a/cmake/ExternalDependencies.cmake b/cmake/ExternalDependencies.cmake index f26af24036..a93bd596d3 100644 --- a/cmake/ExternalDependencies.cmake +++ b/cmake/ExternalDependencies.cmake @@ -39,12 +39,13 @@ else() endif() endif() -option(USE_SYSTEM_BOOST "Whether to try to use the system Boost installation" ON) +option(USE_SYSTEM_BOOST "Whether to try to use the system Boost installation" OFF) set(BOOST_MIN_VERSION 1.80.0 CACHE STRING "Minimum required Boost version") -find_package(Boost ${BOOST_MIN_VERSION} CONFIG QUIET) -if(NOT Boost_FOUND OR NOT USE_SYSTEM_BOOST) +if(USE_SYSTEM_BOOST) + find_package(Boost ${BOOST_MIN_VERSION} CONFIG REQUIRED) +else() set(BOOST_MP_STANDALONE ON CACHE INTERNAL "Use standalone boost multiprecision") @@ -54,14 +55,14 @@ if(NOT Boost_FOUND OR NOT USE_SYSTEM_BOOST) set(BOOST_URL https://github.com/boostorg/multiprecision/archive/refs/tags/Boost_${BOOST_VERSION}.tar.gz) if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24) - FetchContent_Declare(boost_multiprecision URL ${BOOST_URL} FIND_PACKAGE_ARGS - ${BOOST_MIN_VERSION} CONFIG) - list(APPEND FETCH_PACKAGES boost_multiprecision) + FetchContent_Declare(boost_mp URL ${BOOST_URL} FIND_PACKAGE_ARGS ${BOOST_MIN_VERSION} CONFIG + NAMES boost_multiprecision) + list(APPEND FETCH_PACKAGES boost_mp) else() - find_package(boost_multiprecision ${BOOST_MIN_VERSION} QUIET CONFIG) - if(NOT boost_multiprecision_FOUND) - FetchContent_Declare(boost_multiprecision URL ${BOOST_URL}) - list(APPEND FETCH_PACKAGES boost_multiprecision) + find_package(boost_mp ${BOOST_MIN_VERSION} QUIET CONFIG NAMES boost_multiprecision) + if(NOT boost_mp_FOUND) + FetchContent_Declare(boost_mp URL ${BOOST_URL}) + list(APPEND FETCH_PACKAGES boost_mp) endif() endif() endif() diff --git a/include/mqt-core/ir/operations/CompoundOperation.hpp b/include/mqt-core/ir/operations/CompoundOperation.hpp index ff0d17bbef..b83df12a87 100644 --- a/include/mqt-core/ir/operations/CompoundOperation.hpp +++ b/include/mqt-core/ir/operations/CompoundOperation.hpp @@ -41,7 +41,7 @@ class CompoundOperation final : public Operation { [[nodiscard]] bool isNonUnitaryOperation() const override; - [[nodiscard]] inline bool isSymbolicOperation() const override; + [[nodiscard]] bool isSymbolicOperation() const override; [[nodiscard]] bool isCustomGate() const; diff --git a/src/ir/parsers/QASM3Parser.cpp b/src/ir/parsers/QASM3Parser.cpp index f653410168..6b72e8fb0b 100644 --- a/src/ir/parsers/QASM3Parser.cpp +++ b/src/ir/parsers/QASM3Parser.cpp @@ -109,7 +109,7 @@ class OpenQasm3Parser final : public InstVisitor { } for (uint64_t i = 0; i < qubit.second; ++i) { - qubits.emplace_back(qubit.first + i); + qubits.emplace_back(static_cast(qubit.first + i)); } }