diff options
author | Adrien Devresse <adrien.devresse@epfl.ch> | 2017-09-27T03·37-0700 |
---|---|---|
committer | Adrien Devresse <adrien.devresse@epfl.ch> | 2017-10-27T16·46+0200 |
commit | d5134a7f11e32d11caa67e75ae2ae2e506fb54ba (patch) | |
tree | a79eb61722804e184840d5b29f6d5de83657fb2a /CMake/README.md | |
parent | 962e9931d546cd6f062894e15283cea02c7d3220 (diff) |
CMake support
- initial cmake support - downgrade cmake requirement to 2.8.12 - factorize cmake test flags / libs options - refactor test / library under helpers functions, follow bazel's style - Add fix for MSVC and Windows support ( thx @patrikfors ) - Switch to default "add_subdirectory()" usage mode - add CMake/README.md for instructions - add header-only cmake target generator - map absl target to absl:: namespace
Diffstat (limited to 'CMake/README.md')
-rw-r--r-- | CMake/README.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/CMake/README.md b/CMake/README.md new file mode 100644 index 000000000000..53d3d3351891 --- /dev/null +++ b/CMake/README.md @@ -0,0 +1,41 @@ + +## Abseil CMake build instructions + + +### Recommended usage : incorporate Abseil into an CMake project + + We recommended to build and use abseil in the same way than googletest + ( https://github.com/google/googletest/blob/master/googletest/README.md ) + + * Download abseil and copy it in a sub-directory in your project. + + * Or add abseil as a git-submodule in your project + + You can then use the cmake `add_subdirectory()` command to include + abseil directly and use the abseil targets in your project. + + Abseil requires CCTZ and the googletest framework. Consequently, + the targets `gtest`, `gtest_main`, `gmock` and `cctz` need + to be declared in your project before including abseil with `add_subdirectory`. + You can find instructions on how to get and build these projects at these + URL : + * cctz https://github.com/google/cctz + * googletest https://github.com/google/googletest + + + + Here is a short CMakeLists.txt example of a possible project file + using abseil + + project(my_project) + + add_subdirectory(googletest) + add_subdirectory(cctz) + add_subdirectory(abseil-cpp) + + add_executable(my_exe source.cpp) + target_link_libraries(my_exe base synchronization strings) + + + + |