This allows later modification of the selected standard.
Raise C from C89 to C90 as C89 is not supported by the CMAKE flag
https://cmake.org/cmake/help/v3.16/prop_tgt/C_STANDARD.html#prop_tgt:C_STANDARD
dfaure | |
cullmann |
This allows later modification of the selected standard.
Raise C from C89 to C90 as C89 is not supported by the CMAKE flag
https://cmake.org/cmake/help/v3.16/prop_tgt/C_STANDARD.html#prop_tgt:C_STANDARD
No Linters Available |
No Unit Test Coverage |
Buildable 17994 | |
Build 18012: arc lint + arc unit |
I would also use CMAKE_CXX_STANDARD_REQUIRED to make sure the compiler actually *can* c++11, otherwise the flag is only added when the compiler supports it. Should not make much difference nowadays but since it's in ECM...
Good point.
I also tried to investigate the supported C standard by msvc, they say C99 is there but still incomplete.
kde-modules/KDECompilerSettings.cmake | ||
---|---|---|
208 | That's not how it works. set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) Note however that these require CMake >= 3.1, while ECM says cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR). I do however thing that ECM *should* require 3.1. |
Dunno, it's harder to justify in a standalone review :)
"Increase dependency, just because" ;)
I'm seeing build failures in several repositories seemingly caused by 6e3c794 (eg akonadi, kasync)
Building with clang9, before:
-std=c++0x -std=gnu++14 are set
After:
-std=gnu++11
and the build fails with c++14 features such as make_unique
Where did -std=gnu++14 come from? The old code above certainly didn't set it.
Maybe some projects were doing set(CMAKE_CXX_STANDARD 14) before including KDECompilerSettings? We could test the var here to avoid overwriting it...
Another issue caused by the new CMake 3.5 dependency, some tests fail:
59 - ecm_setup_version-old_simple (Failed) 60 - ecm_setup_version-old_soversion (Failed) 61 - ecm_setup_version-old_version_file (Failed) 62 - ecm_setup_version-old_version_file_abspath (Failed) 63 - ecm_setup_version-old_version_file_anynewer (Failed) 64 - ecm_setup_version-old_version_file_exact (Failed) 65 - ecm_setup_version-old_version_file_samemajor (Failed) 66 - ecm_setup_version-old_header (Failed) 67 - ecm_setup_version-old_header_abspath (Failed)
(+2 others not related to the recent changes)
I didn't look yet at the details. My guess is the CMake policy changes between 2.8.12 and 3.5
Where are those tests running? I'm only aware of https://build.kde.org/job/Frameworks/job/extra-cmake-modules/
The tests are currntly sadly skipped on CI, compare T11858
Someone(tm) needs to act on this, myself had no time yet.