From bb313dd0b10d652d364896950d657aa3d35c7f78 Mon Sep 17 00:00:00 2001 From: burgholzer Date: Tue, 13 Aug 2024 23:29:28 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor=20how=20boost?= =?UTF-8?q?=5Fmultiprecision=20is=20pulled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * shorten the name to `boost_mp` * do not use system boost by default * require finding boost when opting for system boost Signed-off-by: burgholzer --- cmake/ExternalDependencies.cmake | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/cmake/ExternalDependencies.cmake b/cmake/ExternalDependencies.cmake index f26af2403..a93bd596d 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() From cce41812376dce6cb398535395c634a31fd88b7c Mon Sep 17 00:00:00 2001 From: Lukas Burgholzer Date: Sun, 11 Aug 2024 12:56:01 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=9A=A8=20fix=20compiler=20warning=20o?= =?UTF-8?q?n=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lukas Burgholzer --- src/ir/parsers/QASM3Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ir/parsers/QASM3Parser.cpp b/src/ir/parsers/QASM3Parser.cpp index f65341016..6b72e8fb0 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)); } } From 666f2c0457642b9452d179f31eb8bcbb571d6af8 Mon Sep 17 00:00:00 2001 From: Lukas Burgholzer Date: Sun, 11 Aug 2024 12:29:43 +0200 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A9=B9=20non-inline=20method=20should?= =?UTF-8?q?=20not=20be=20declared=20inline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lukas Burgholzer --- include/mqt-core/ir/operations/CompoundOperation.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mqt-core/ir/operations/CompoundOperation.hpp b/include/mqt-core/ir/operations/CompoundOperation.hpp index ff0d17bbe..b83df12a8 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;