libnonius / nonius

A C++ micro-benchmarking framework
https://nonius.io
Creative Commons Zero v1.0 Universal
359 stars 47 forks source link

Conan package for Nonius #45

Closed bjoernpollex closed 8 years ago

bjoernpollex commented 8 years ago

I've created a Conan-package for Nonius here. It works for me on Mac OS X, but I have no way of testing it on Windows.

Also, in order to configure the Boost dependency better, it would be useful to know for which versions of Visual Studio specifically it is required.

I'm happy for any feedback. If you have no objections, once it's confirmed working on Windows, I'd publish it in the Conan central repository.

nabijaczleweli commented 8 years ago

conan v0.6.0 @ Windows 10:

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

D:\Programy\Programowanie\Conan\conan>conan

It seems to be the first time you run conan
Auto detecting your dev setup to initialize conan.conf
Found gcc 5.3
CC and CXX: ,
Default conan.conf settings
        os=Windows
        arch=x86_64
        compiler=gcc
        compiler.version=5.3
        build_type=Release
*** You can change them in ~/.conan/conan.conf ***
*** Or override with -s compiler='other' -s ...s***

Conan commands. Type $conan "command" -h for help
  build      calls your project conanfile.py "build" method.
  export     copies a conanfile.py and associated (export) files to your local store,
  info       Prints information about the requirements.
  install    install in the local store the given requirements.
  package    calls your conanfile.py "package" method for a specific package.
  remove     Remove any folder from your local/remote store
  search     show local/remote packages
  test       build and run your package test. Must have conanfile.py with "test"
  upload     uploads a conanfile or binary packages from the local store to any remote.
  user       shows or change the current user

D:\Programy\Programowanie\Conan\conan>conan install

D:\Programy\Programowanie\Conan\conan>cd nonius_conan_package

D:\Programy\Programowanie\Conan\conan\nonius_conan_package>..\conan export demo
WARN: Conanfile doesn't have 'url'.
It is recommended to add your repo URL as attribute
WARN: Conanfile doesn't have a 'license'.
It is recommended to add the package license as attribute
A new conanfile.py version was exported
conanfile.py exported as nonius/1.1.2@demo/testing.
Folder: D:\Users\nabijaczleweli\.conan\data\nonius\1.1.2\demo\testing\export

D:\Programy\Programowanie\Conan\conan\nonius_conan_package>..\conan test
Conan Boost/1.60.0@lasote/stable not found, retrieving from server
Found in remote 'conan.io'
Downloading conanfile.pyc
[==================================================]
Downloading conanmanifest.txt
[==================================================]
Downloading conanfile.py
[==================================================]
Downloading FindBoost.cmake
[==================================================]
ERROR: Boost/1.60.0@lasote/stable: 'settings.compiler.runtime' doesn't exist for 'gcc'
'settings.compiler' possible configurations are ['version']
>g++ --version
g++ (Rev1, Built by MSYS2 project) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
rmartinho commented 8 years ago

Boost is needed everywhere because of the statistical functions (I'm not going to reinvent those any time soon). VS <2015 needs Boost.Chrono in addition to that because their header is broken. Nothing else needs anything. I think this still works with Boost as old as 1.54 but from now on I'm sticking to the latest three versions in my testing (1.58, 1.59, and 1.60 at the time of writing).

Feel free to push it.

bjoernpollex commented 8 years ago

Sorry it took me so long to get back to this. I've uploaded two packages for Nonius to conan.io, one for the current stable release, and one for the current beta release. Please let me know if you have feedback. I'll look into the issue with Boost above.

For now I'm happy to track releases and publish packages, but I'll also look into how to automate this (needs to be figured out anyway).

bjoernpollex commented 8 years ago

@nabijaczleweli, the issue you see there seems to be in the recipe for Boost. I've created an issue to track this.

bjoernpollex commented 8 years ago

@nabijaczleweli, according to the package author of the Boost package, this error doesn't happen anymore, however, he has trouble compiling the example. Could you run it again with an up-to-date version of Conan?

nabijaczleweli commented 8 years ago

@bjoernpollex

d:\nonius_conan_package>conan export demo
**** Migrating to conan 0.8 *****
- A new settings.yml has been defined
  Your old file has been backup'd to: D:\Users\nabijaczleweli\.conan\settings.yml.backup
nonius/1.1.2@demo/testing: A new conanfile.py version was exported
nonius/1.1.2@demo/testing: Folder: D:\Users\nabijaczleweli\.conan\data\nonius\1.1.2\demo\testing\export

d:\nonius_conan_package>conan test
Exporting package recipe
nonius/1.1.2@demo/testing: The stored package has not changed
ERROR: Conanfile: 'settings.compiler.libcxx' value not defined
d:\nonius_conan_package>conan --version
Conan version 0.12.0
d:\nonius_conan_package>g++ --version
g++ (Rev1, Built by MSYS2 project) 6.1.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.