Giter Site home page Giter Site logo

libswid's Introduction

libswid

Build Status codecov Sonar Cloud Documentation Status

Library for interfacing with SWID tags

Build

You will need:

  • C++ toolchain.
  • Xerces XML parsing library.
  • TinyXML XML parsing library.
  • lcov for coverage reports.
$ mkdir -p build && cd build && rm -rf *
$ cmake .. && make && make test
$ make lcov && xdg-open lcov/html/all_targets/index.html

If you have downloaded the SWID validator, extract it and pass the path to the validator .jar to Cmake like this:

cmake -DSWID_VALIDATOR=/path/to/validator/swid/swidval-0.5.0.jar ..

Then, the test suite will use it in some of the tests.

libswid's People

Contributors

dahaic avatar matejak avatar mpreisler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libswid's Issues

pointer and ref are middle aligned

It's a personal preference but I will go ahead and complain about it anyway :-P

Consider this:
a * b - at first glance you are not sure if it's a multiplied by b or a pointer to a stored in b.
a & b - bitwise and or ref?
const a & b

IMO stick to industry standards, nobody cares if it's a *b or a* b but a * b is super rare and weird... I personally prefer a* b but as long as it's not in the middle I am fine and can read it quickly.

Configuration works without tinyxml but it doesn't build without it

mpreisle@t450s ~/d/libswid/build $ make -j 4
Scanning dependencies of target gen_swid_swidPYTHON_wrap
Scanning dependencies of target unit_tests
Scanning dependencies of target resaver
[  3%] Swig source
[  6%] Building CXX object CMakeFiles/swid.dir/src/Translator.cpp.o
[  9%] Building CXX object CMakeFiles/resaver.dir/src/SWIDStruct.cpp.o
[ 12%] Building CXX object CMakeFiles/unit_tests.dir/test/unit/test-main.cpp.o
[ 15%] Building CXX object CMakeFiles/resaver.dir/src/Translator.cpp.o
/home/mpreisle/d/libswid/src/SWIDStruct.h:57: Warning 503: Can't wrap 'operator |' unless renamed to a valid identifier.
/home/mpreisle/d/libswid/src/SWIDStruct.h:58: Warning 503: Can't wrap 'operator &' unless renamed to a valid identifier.
[ 15%] Built target gen_swid_swidPYTHON_wrap
[ 18%] Building CXX object CMakeFiles/unit_tests.dir/test/unit/test.cpp.o
In file included from /home/mpreisle/d/libswid/test/unit/test.cpp:6:0:
/home/mpreisle/d/libswid/src/loader-tinyxml.h:26:10: fatal error: tinyxml.h: No such file or directory
 #include <tinyxml.h>
          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/unit_tests.dir/build.make:76: CMakeFiles/unit_tests.dir/test/unit/test.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 21%] Building CXX object CMakeFiles/resaver.dir/src/lib.cpp.o
In file included from /home/mpreisle/d/libswid/src/lib.cpp:28:0:
/home/mpreisle/d/libswid/src/loader-tinyxml.h:26:10: fatal error: tinyxml.h: No such file or directory
 #include <tinyxml.h>
          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/resaver.dir/build.make:89: CMakeFiles/resaver.dir/src/lib.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 25%] Building CXX object CMakeFiles/swid.dir/src/lib.cpp.o
In file included from /home/mpreisle/d/libswid/src/lib.cpp:28:0:
/home/mpreisle/d/libswid/src/loader-tinyxml.h:26:10: fatal error: tinyxml.h: No such file or directory
 #include <tinyxml.h>
          ^~~~~~~~~~~
compilation terminated.
mpreisle@t450s ~/d/libswid/build $ cmake ../                      
-- Found XercesC: /usr/lib64/libxerces-c.so (found version "3.1.4") 
-- Could NOT find TinyXML (missing: TinyXML_LIBRARY TinyXML_INCLUDE_DIR) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mpreisle/d/libswid/build

bundled header

test/unit/catch.hpp is a boost header, please consider including the header from boost instead of including it in your project. Bundling is a big red flag for downstream distribution, Fedora, Debian, RHEL and others all have rules against it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.