diff --git a/pkg/Info.plist b/pkg/Info.plist index 70f94767..6f496eec 100644 --- a/pkg/Info.plist +++ b/pkg/Info.plist @@ -18,5 +18,7 @@ org.speedcrunch CFBundleShortVersionString 0.12 + LSMinimumSystemVersion + 10.14 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c888cbaa..5ebc7dae 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,6 +30,15 @@ add_compile_options(-Wall -pedantic) if(APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + + option(UNIVERSAL_SPEEDCRUNCH "Build universal binary for both Intel and Apple Silicon" OFF) + if(UNIVERSAL_SPEEDCRUNCH) + set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING " architectures" FORCE) + endif() + + if(NOT CMAKE_OSX_DEPLOYMENT_TARGET) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "Minimum macOS version") + endif() endif() set(speedcrunch_VERSION "master") diff --git a/src/math/rational.h b/src/math/rational.h index dfda4438..21aadaec 100644 --- a/src/math/rational.h +++ b/src/math/rational.h @@ -66,4 +66,9 @@ class Rational double toDouble() const; }; +inline unsigned int qHash(const Rational& r) +{ + return qHash(r.numerator()) ^ qHash(r.denominator()); +} + #endif // RATIONAL_H diff --git a/src/speedcrunch.pro b/src/speedcrunch.pro index 5ea04f37..68262eb3 100644 --- a/src/speedcrunch.pro +++ b/src/speedcrunch.pro @@ -53,7 +53,7 @@ macx { ICON = resources/speedcrunch.icns QMAKE_INFO_PLIST = ../pkg/Info.plist TARGET = SpeedCrunch - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8 + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 QMAKE_CXXFLAGS += -std=c++17 }