Skip to content

Modern CMake Project consuming abseil/abseil-cpp as add_subdirectory or install

License

Notifications You must be signed in to change notification settings

Mizux/cmake-abseil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is an integration test of Abseil in a Modern CMake C++ Project using ExternalProject module.

We try to integrate abseil-cpp using add_subdirectory(abseil-cpp) or by installing it first (in astaging area) then using find_package(absl).

This project should run on Linux, Mac and Windows.

CMake Dependencies Tree

This CMake project is composed of one executable (FooApp) and one library (Foo) with the following dependencies:

absl:
Foo: absl::strings
FooApp: Foo, absl::strings

Strategy 1: add_subdirectory(abseil-cpp)

Build Status Build status

To see the integration of abseil-cpp as add_subdirectory() please take a look at the branch add_subdirectory

spoiler: This is not working (as intended)

Strategy 2: find_package(absl)

Build Status Build status

To see the integration of abseil-cpp using find_package() (and local staging install) please take a look at the branch install

spoiler: This is the way to go

Known issues

On windows, abseil-cpp link flags /ignore:4221 break the integration see abseil-cpp#293

Contributing

The CONTRIBUTING.md file contains instructions on how to file the Contributor License Agreement before sending any pull requests (PRs). Of course, if you're new to the project, it's usually best to discuss any proposals and reach consensus before sending your first PR.

License

Apache 2. See the LICENSE file for details.

Disclaimer

This is not an official Google product, it is just code that happens to be owned by Google.

About

Modern CMake Project consuming abseil/abseil-cpp as add_subdirectory or install

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published