forked from google/cpu_features
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# CMake build instructions | ||
|
||
## Recommended usage : Incorporating cpu_features into a CMake project | ||
|
||
For API / ABI compatibility reasons, it is recommended to build and use | ||
cpu_features in a subdirectory of your project or as an embedded dependency. | ||
|
||
This is similar to the recommended usage of the googletest framework | ||
( https://github.com/google/googletest/blob/master/googletest/README.md ) | ||
|
||
Build and use step-by-step | ||
|
||
|
||
1- Download cpu_features and copy it in a sub-directory in your project. | ||
or add cpu_features as a git-submodule in your project | ||
|
||
2- You can then use the cmake command `add_subdirectory()` to include | ||
cpu_features directly and use the `cpu_features` target in your project. | ||
|
||
3- Add the `cpu_features` target to the `target_link_libraries()` section of | ||
your executable or of your library. | ||
|
||
## Enabling tests | ||
|
||
CMake default options for cpu_features is Release built type with tests | ||
disabled. To enable testing set cmake `BUILD_TESTING` variable to `ON`, | ||
[.travis.yml](../.travis.yml) and [appveyor.yml](../appveyor.yml) have up to | ||
date examples. |