Commit d7a3e49c authored by Kenton Varda's avatar Kenton Varda

cmake: cxx_std_14 -> cxx_generic_lambdas

Apparently, this is compatible with older versions of cmake, while having the same effect. Apparently, the cmake people spent some time refuling to let people specify C++ standard versions and instead insisted that they specify specific features instead. They did not see the light until cmake 3.8, but that's too new for us to require yet, I guess.
parent 3accec7d
......@@ -136,7 +136,8 @@ function(_capnp_import_pkg_config_target target)
set_target_properties(CapnProto::${target} PROPERTIES
${imported_soname_property}
IMPORTED_LOCATION "${target_location}"
INTERFACE_COMPILE_FEATURES "cxx_std_14"
# TODO(cleanup): Use cxx_std_14 once it's safe to require cmake 3.8.
INTERFACE_COMPILE_FEATURES "cxx_generic_lambdas"
INTERFACE_COMPILE_OPTIONS "${${target}_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${${target}_INCLUDE_DIRS}"
......
......@@ -71,7 +71,8 @@ set(kj-std_headers
)
add_library(kj ${kj_sources})
add_library(CapnProto::kj ALIAS kj)
target_compile_features(kj PUBLIC cxx_std_14)
# TODO(cleanup): Use cxx_std_14 once it's safe to require cmake 3.8.
target_compile_features(kj PUBLIC cxx_generic_lambdas)
if(UNIX AND NOT ANDROID)
target_link_libraries(kj PUBLIC pthread)
......
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