summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2017-10-20 10:39:16 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2017-10-20 18:25:40 (GMT)
commitca7e60edd370949cfb2adb83ca0b532bb3fdc441 (patch)
treec0c275fd9ba8a47d72cf26013409839e03854225 /src
parent02f726b63e2b3a2ed4c5da43c164dcaad5fcfe94 (diff)
downloadDoxygen-ca7e60edd370949cfb2adb83ca0b532bb3fdc441.zip
Doxygen-ca7e60edd370949cfb2adb83ca0b532bb3fdc441.tar.gz
Doxygen-ca7e60edd370949cfb2adb83ca0b532bb3fdc441.tar.bz2
CMake: let CMake handle the C++ standard setting if target_compile_features() is used
This raises the required CMake version for this branch to get a better error message. target_compile_features() was introduced in CMake 3.1.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8362bee..5c55efa 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -249,10 +249,11 @@ if (use_libclang)
find_package(LLVM REQUIRED CONFIG)
find_package(Clang REQUIRED CONFIG)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ cmake_minimum_required(VERSION 3.1)
target_compile_features(_doxygen PRIVATE cxx_alignof)
target_compile_features(doxygen PRIVATE cxx_alignof)
- target_compile_options(_doxygen PRIVATE -stdlib=libc++ -std=c++11)
- target_compile_options(doxygen PRIVATE -stdlib=libc++ -std=c++11)
+ target_compile_options(_doxygen PRIVATE -stdlib=libc++)
+ target_compile_options(doxygen PRIVATE -stdlib=libc++)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(_doxygen PRIVATE -std=c++11)
target_compile_options(doxygen PRIVATE -std=c++11)