2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #include "juce_StandardHeader.h"
30 #include "../text/juce_String.h"
31 #include "juce_SystemStats.h"
32 #include "juce_Time.h"
33 #include "juce_PlatformUtilities.h"
36 //==============================================================================
37 const SystemStats::CPUFlags
& SystemStats::getCPUFlags()
39 static CPUFlags cpuFlags
;
43 String
SystemStats::getJUCEVersion()
45 // Some basic tests, to keep an eye on things and make sure these types work ok
46 // on all platforms. Let me know if any of these assertions fail on your system!
47 static_jassert (sizeof (pointer_sized_int
) == sizeof (void*));
48 static_jassert (sizeof (int8
) == 1);
49 static_jassert (sizeof (uint8
) == 1);
50 static_jassert (sizeof (int16
) == 2);
51 static_jassert (sizeof (uint16
) == 2);
52 static_jassert (sizeof (int32
) == 4);
53 static_jassert (sizeof (uint32
) == 4);
54 static_jassert (sizeof (int64
) == 8);
55 static_jassert (sizeof (uint64
) == 8);
57 // (these confusing macros convert numbers into a single string literal)
58 #define JUCE_STRINGIFYVERSION2(a) #a
59 #define JUCE_STRINGIFYVERSION(a) JUCE_STRINGIFYVERSION2(a)
61 return "JUCE v" JUCE_STRINGIFYVERSION(JUCE_MAJOR_VERSION
)
62 "." JUCE_STRINGIFYVERSION(JUCE_MINOR_VERSION
)
63 "." JUCE_STRINGIFYVERSION(JUCE_BUILDNUMBER
);
65 #undef JUCE_STRINGIFYVERSION
66 #undef JUCE_STRINGIFYVERSION2
69 #if JUCE_DEBUG && ! JUCE_ANDROID
70 struct JuceVersionPrinter
74 DBG (SystemStats::getJUCEVersion());
78 static JuceVersionPrinter juceVersionPrinter
;