Skip to content

Commit

Permalink
add betterC module constructor (#33)
Browse files Browse the repository at this point in the history
* add constr

* add meson (#34)

* add mir-algorithm dep to meson

* add constr

* ditto

* update ci configs

* fix ddoc generation

* workaround dmd bug

* Fix bugs

* update readme
  • Loading branch information
9il authored Sep 26, 2018
1 parent bd510a6 commit 4617bf8
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 130 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ cpuid-report
*.sublime-workspace

mir-cpuid-test-library
cpuid-report.exe
mir-cpuid-test-library.exe
mir-cpuid.lib
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ void main()
import std.stdio;
import cpuid.unified;
cpuid_init();
enum fmt = "%14s: %s";
fmt.writefln("cores", cores);
Expand Down Expand Up @@ -54,6 +52,8 @@ See also [output example](https://gist.github.com/9il/66d2f824ca52e1293358b86604

## Building a betterC library

BetterC mode works when compiled with LDC only.

```
dub build --compiler=ldmd2 --build=betterC --build-mode=singleFile --parallel
```
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ platform: x64
environment:
matrix:
- DC: dmd
DVersion: 2.080.0
DVersion: 2.082.0
arch: x64
- DC: dmd
DVersion: 2.080.0
DVersion: 2.082.0
arch: x86
- DC: ldc
DVersion: '1.10.0'
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
machine:
environment:
DMD: 2.074.0
DMD: 2.082.0
DUB: 1.0.0
PATH: "${HOME}/dmd2/linux/bin64:${PATH}"
LD_LIBRARY_PATH: "${HOME}/dmd2/linux/lib64:${LD_LIBRARY_PATH}"
Expand Down
2 changes: 1 addition & 1 deletion dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"authors": [
"Ilya Yaroshenko"
],
"dependencies": {"mir-algorithm": ">=0.4.10"},
"dependencies": {"mir-algorithm": ">=2.0.6"},
"description": "CPU characteristics identification",
"copyright": "Ilya Yaroshenko",
"license": "BSL-1.0",
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project('mir-cpuid', 'd', version : '0.5.4', license: 'BSL-1.0')
project('mir-cpuid', 'd', version : '1.0.0', license: 'BSL-1.0')

mir_algorithm_dep = dependency('mir-algorithm', fallback : ['mir-algorithm', 'mir_algorithm_dep'])

Expand Down
2 changes: 1 addition & 1 deletion report.d
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void main()
{
import cpuid.unified;
import cpuid.report;
cpuid_init();

import std.stdio;
cpuid.report.unified.writeln;
version(X86)
Expand Down
4 changes: 2 additions & 2 deletions source/cpuid/intel.d
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct Leaf2Information
Specification: Intel
+/
nothrow @nogc
nothrow @nogc pure
this()(CpuInfo info)
{
version(BigEndian) static assert(0, "Leaf2Information is not implemented for BigEndian.");
Expand Down Expand Up @@ -718,7 +718,7 @@ union Leaf4Information

version(D_Ddoc)
{
@trusted @property pure nothrow @nogc:
@trusted @property pure nothrow @nogc const:
/// Cache Type Field.
Type type();
/// Cache Level (starts at 1).
Expand Down
Loading

0 comments on commit 4617bf8

Please sign in to comment.