Commit 240c1593 authored by Victor Zverovich's avatar Victor Zverovich Committed by Facebook Github Bot

Fix building projects that use target_compile_features

Summary:
Building a project that uses folly and `target_compile_features` may fail
because folly requires C++14 and CMake doesn't know about it. So if a project
has only C++11 features in `target_compile_features` CMake will pick
`-std=gnu++11` or similar and compilation will fail on an assertion in
`folly/Portability.h`. To fix this, add `target_compile_features` to the
`folly` target pushing the minimum required standard to C++14.

Reviewed By: Orvid

Differential Revision: D16884888

fbshipit-source-id: 0e5ac4abde10b1ea757011bcd05b17d508859b4f
parent bca45896
...@@ -333,6 +333,7 @@ add_library(folly ...@@ -333,6 +333,7 @@ add_library(folly
$<TARGET_OBJECTS:folly_base> $<TARGET_OBJECTS:folly_base>
) )
apply_folly_compile_options_to_target(folly) apply_folly_compile_options_to_target(folly)
target_compile_features(folly INTERFACE cxx_generic_lambdas)
target_link_libraries(folly PUBLIC folly_deps) target_link_libraries(folly PUBLIC folly_deps)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment