build: cleanup cflags vs. add_definition

The CFLAGS variable is filled with CMAKE_C_FLAGS, not with CMAKE_C_CFLAGS.

Also turn all add_definition statements into CMAKE_C_FLAGS and
CMAKE_CXX_FLAGS variable settings.

Change-Id: If3ad604cea2cae169b08c28ee95b9acfd59962fd
Signed-off-by: Christian Himpel <christian.himpel@intel.com>
libipt: rename pt_cpuid to pt_cpu

Change-Id: I124d1132446d5a5ecb1e2daf08b717af9a0d2250
Signed-off-by: Christian Himpel <christian.himpel@intel.com>
libipt: add cpuid support

Read cpuid during pt_configure.

- Use on Linux and Darwin cpuid.h, which offer the same interface.
- Use intrin.h on Windows.

Change-Id: I19cac54159e8e5fae2c0b2e3597cd06e679dbe25
Signed-off-by: Christian Himpel <christian.himpel@intel.com>
libipt: add cpu parser

The parser accepts a f/m[/s] formatted string and fills a pt_cpu struct
with the result.

This will be used by the pt* tools to parse cpu values given on the
command-line.

Change-Id: I7968f6195efead2ad717c615a51d0d2eaada025f
Signed-off-by: Christian Himpel <christian.himpel@intel.com>
ptxed: add cpu support

Change-Id: I999c684db8f76634e11fe4f59b2a718b00d24add
Signed-off-by: Christian Himpel <christian.himpel@intel.com>
ptdump: add cpu support

Change-Id: I3144e987d121bfa717d3a0e13cd2f1dabe0d5b93
Signed-off-by: Christian Himpel <christian.himpel@intel.com>
pttc: add cpu support

Add --cpu command-line option which is used to initialize the PT
encoder.

If a specific cpu is specified, the resulting output files will have the
cpu encoded.

Change-Id: I488776a7e7a38e03b8cda6f9b91dcae6733499c1
Signed-off-by: Christian Himpel <christian.himpel@intel.com>
script/test.bash: better option parsing and verbose output

Change-Id: I954831131f4eef5a5011ada89f1b2a1bd9ce6dab
Signed-off-by: Christian Himpel <christian.himpel@intel.com>
script/test.bash: add cpu support

It is now possible to specify that the ptt tests are executed with a
specific cpu.

Also the ptt files can have an annotation "; cpu f/m[/s]" that is used
by the test script, which will in turn run the test for each cpu found
in the file.

Change-Id: I88acdd2fb9ae6627c1c4d101d8a84c28ca84c553
Signed-off-by: Christian Himpel <christian.himpel@intel.com>