Commit a8a8dbf9 authored by Julien Wintz's avatar Julien Wintz
Browse files

Matchmaking for non support and support configuration headers.

parent bf7afff9
/* dtkConfig.h.in ---
*
/* dtkConfig.h.in ---
*
* Author: Julien Wintz
* Copyright (C) 2008 - Julien Wintz, Inria.
* Created: Tue Mar 15 17:04:44 2011 (+0100)
......@@ -9,12 +9,12 @@
* Update #: 26
*/
/* Commentary:
*
/* Commentary:
*
*/
/* Change log:
*
*
*/
#ifndef DTKCONFIG_H
......@@ -24,8 +24,8 @@
#define DTK_VERSION_MINOR @dtk_VERSION_MINOR@
#define DTK_VERSION_BUILD @dtk_VERSION_BUILD@
#cmakedefine DTK_PLATFORM_32
#cmakedefine DTK_PLATFORM_64
#cmakedefine DTK_BUILD_32
#cmakedefine DTK_BUILD_64
#cmakedefine DTK_HAVE_MPI
#cmakedefine DTK_HAVE_EDIT
......
......@@ -53,7 +53,7 @@ dtkCpuid::~dtkCpuid(void)
void dtkCpuid::load(unsigned i) {
#if defined(Q_OS_WIN) && defined(Q_CC_MSVC)
__cpuid((int *)d->regs, (int)i);
#elif defined(DTK_PLATFORM_64)
#elif defined(DTK_BUILD_64)
asm volatile
("cpuid" : "=a" (d->regs[0]), "=b" (d->regs[1]), "=c" (d->regs[2]), "=d" (d->regs[3])
: "a" (i), "c" (0));
......
......@@ -64,7 +64,7 @@
# define DTK_PRETTY_FUNCTION __FUNCSIG__
#elif defined __GNUG__
# define DTK_PRETTY_FUNCTION __PRETTY_FUNCTION__
#else
#else
# define DTK_PRETTY_FUNCTION __func__
#endif
......@@ -98,10 +98,10 @@
# define DTK_COMPILER_WARNING(str) ("WARNING: " str)
#endif
#ifdef DTK_PLATFORM_32
#ifdef DTK_BUILD_32
# define dtkxarch_int qint32
# define dtkxarch_uint quint32
#elif defined DTK_PLATFORM_64
#elif defined DTK_BUILD_64
# define dtkxarch_int qint64
# define dtkxarch_uint quint64
#endif
......@@ -150,21 +150,21 @@
// /////////////////////////////////////////////////////////////////
template <typename T> class dtkTypeInfo
{
{
public:
enum {
enum {
dtkObjectPointer = false,
dtkAbstractObjectPointer = false,
dtkMatrixRealPointer = false
};
};
};
// Specialize to avoid sizeof(void) warning
template<> class dtkTypeInfo<void*>
{
public:
enum {
enum {
dtkObjectPointer = false,
dtkAbstractObjectPointer = false,
dtkMatrixRealPointer = false
......@@ -196,7 +196,7 @@ public:
static no_type checkAbstractMatrix(...);
public:
enum {
enum {
dtkObjectPointer = (sizeof(checkObject(static_cast<T*>(0))) == sizeof(yes_type)),
dtkAbstractObjectPointer = (sizeof(checkAbstractObject(static_cast<T*>(0))) == sizeof(yes_type)),
dtkMatrixRealPointer = (sizeof(checkAbstractMatrix(static_cast<T*>(0))) == sizeof(yes_type))
......@@ -291,4 +291,3 @@ inline uint qHash(const QStringList &key)
hash = hash ^ qHash(string);
return hash;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment