summaryrefslogtreecommitdiff
path: root/CMake/AbseilDll.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMake/AbseilDll.cmake')
-rw-r--r--CMake/AbseilDll.cmake21
1 files changed, 1 insertions, 20 deletions
diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake
index 40219207..01aa2c19 100644
--- a/CMake/AbseilDll.cmake
+++ b/CMake/AbseilDll.cmake
@@ -594,14 +594,6 @@ set(ABSL_INTERNAL_TEST_DLL_TARGETS
"scoped_mock_log"
)
-function(_absl_target_compile_features_if_available TARGET TYPE FEATURE)
- if(FEATURE IN_LIST CMAKE_CXX_COMPILE_FEATURES)
- target_compile_features(${TARGET} ${TYPE} ${FEATURE})
- else()
- message(WARNING "Feature ${FEATURE} is unknown for the CXX compiler")
- endif()
-endfunction()
-
include(CheckCXXSourceCompiles)
check_cxx_source_compiles(
@@ -789,18 +781,7 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
# Abseil libraries require C++14 as the current minimum standard. When
# compiled with C++17 (either because it is the compiler's default or
# explicitly requested), then Abseil requires C++17.
- _absl_target_compile_features_if_available(${_dll} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE})
- else()
- # Note: This is legacy (before CMake 3.8) behavior. Setting the
- # target-level CXX_STANDARD property to ABSL_CXX_STANDARD (which is
- # initialized by CMAKE_CXX_STANDARD) should have no real effect, since
- # that is the default value anyway.
- #
- # CXX_STANDARD_REQUIRED does guard against the top-level CMake project
- # not having enabled CMAKE_CXX_STANDARD_REQUIRED (which prevents
- # "decaying" to an older standard if the requested one isn't available).
- set_property(TARGET ${_dll} PROPERTY CXX_STANDARD ${ABSL_CXX_STANDARD})
- set_property(TARGET ${_dll} PROPERTY CXX_STANDARD_REQUIRED ON)
+ target_compile_features(${_dll} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE})
endif()
install(TARGETS ${_dll} EXPORT ${PROJECT_NAME}Targets