Commit f2925b5c authored by Milian Wolff's avatar Milian Wolff
Browse files

Use C++17 to compile KDevelop

Fix the (broken) usage of operator++ in test_kdevhash to make it
compile. Just flip/flop between the values instead.
parent 5dcac2c9
......@@ -8,6 +8,9 @@ set(KDEVELOP_SOVERSION 57)
# plugin version as used e.g. in plugin installation path
set(KDEV_PLUGIN_VERSION 35)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
# we need some parts of the ECM CMake helpers
find_package (ECM 5.50.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${KDevelop_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
......
......@@ -32,7 +32,11 @@ template <typename T>
std::vector<T> generateData(std::size_t size)
{
auto ret = std::vector<T>(size);
std::iota(ret.begin(), ret.end(), T(0));
if constexpr (std::is_same_v<T, bool>) {
std::generate(ret.begin(), ret.end(), [i = 0]() mutable { return (i++ % 2) == 0; });
} else {
std::iota(ret.begin(), ret.end(), T(0));
}
return ret;
}
......
......@@ -68,8 +68,3 @@ target_link_libraries(kdevmesonmanager
KDev::Util
KDev::OutputView
)
set_target_properties(kdevmesonmanager PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED YES
)
......@@ -92,7 +92,3 @@ target_link_libraries(kdevqtc-qmlsupport
Qt5::Network
Qt5::Xml
)
set_target_properties(kdevqtc-qmlsupport PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED YES
)
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