[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/utils/abakus
From: Michael Pyne <michael.pyne () kdemail ! net>
Date: 2007-12-07 4:32:26
Message-ID: 1197001946.140142.12504.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 745805 by mpyne:
Add in proper configure check for mpfr.
M +18 -0 CMakeLists.txt
M +1 -1 src/CMakeLists.txt
M +1 -1 src/numerictypes.h
--- trunk/playground/utils/abakus/CMakeLists.txt #745804:745805
@@ -4,7 +4,25 @@
FIND_PACKAGE(KDE4 REQUIRED)
include(KDE4Defaults)
+include(CheckCXXSourceCompiles)
+# Check for libmpfr and libgmp, and verify existence of _mpfr_struct
+set(CMAKE_REQUIRED_LIBRARIES gmp mpfr)
+check_cxx_source_compiles(
+ "#include <mpfr.h>
+
+ int main() {
+ mpfr_t a;
+ mpfr_ptr ptr;
+ __mpfr_struct debug;
+
+ mpfr_init(a);
+ return 0;
+ }
+ "
+ HAVE_MPFR
+ )
+
INCLUDE_DIRECTORIES(${KDE4_INCLUDES} ${QT4_INCLUDES})
ADD_DEFINITIONS(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
--- trunk/playground/utils/abakus/src/CMakeLists.txt #745804:745805
@@ -123,8 +123,8 @@
)
set(MPFR_LIBS)
-set(HAVE_MPFR 0)
IF(HAVE_MPFR)
+ MESSAGE("Using the MPFR high-precision mathematics library")
SET(MPFR_LIBS mpfr gmp)
ELSE(HAVE_MPFR)
SET(abakus_SRCS ${abakus_SRCS} hmath.cpp number.c)
--- trunk/playground/utils/abakus/src/numerictypes.h #745804:745805
@@ -260,7 +260,7 @@
explicit number(const QByteArray &str)
{
m_t = (mpfr_ptr) new __mpfr_struct;
- mpfr_init_set_str (m_tr, str.constData(), 10, RoundDirection);
+ mpfr_init_set_str (m_t, str.constData(), 10, RoundDirection);
}
explicit number(int i)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic