6.4 KiB
Technical To-Do List
Some work is blocked for technical reasons, and can only be done once certain other criteria are met (e.g. library versions).
Because KiCad supports distributions with relatively long support cycles, many of these workarounds will be required for some time, so they are easily forgotten.
This section collects these so they can be dealt with when the project's minimum version for that dependency is met. This kind of code should always be documented in detail at the place of use, so that it's clear what action should be taken in future.
[TOC]
C++ Versions
Newer C++ versions include features that make some of our current code unnecessary.
C++11
This C++ standard version is already used by KiCad, but much code that pre-dates the version switch exists and can be tidied.
MUTEX
can usestd::mutex
and remove the Boost mutex dependency and the wholeki_mutex.h
header in favour of<mutex>
.std::auto_ptr
should be changed tostd::unique_ptr
.auto_ptr
is removed entirely in C++17.
C++14
Compiler support:
- GCC: complete by GCC 5: GCC C++14 support.
Provides:
std::make_unique
is available. The "polyfill" inmake_unique.h
is no longer required and can be removed.
C++17
Compiler support:
- GCC: from GCC 5 to 7: GCC C++17 support.
Provides:
OPT<>
can be replaced withstd::optional
. Headercore/optional.h
can be removed and replaced with the built-in<optional>
. Needs GCC 7.std::filesystem
can replaceboost::filesystem
and the Boost dependency can be dropped entirely from the CMake files.
Compilers
Some compilers have bugs or limitations to C++ standard support.
GCC
Current versions:
GCC 7
- Fixes bug #56480
(Explicit specialization in a different namespace). This
means the
BOOST_TEST_PRINT_NAMESPACE_OPEN
macro is not required, a namespace alias can be used instead.
3rd Party Libraries
There are several places in KiCad where workarounds exist for defects in 3rd party library limitations or defects.
Boost
Current versions:
1.59
- Boost 1.59 brings a major overhaul of the Boost test library.
- Many "Polyfills" un
unit_test_utils.h
can be removed:BOOST_TEST_CONTEXT
andBOOST_TEST_INFO
are available, remove the polyfill macros.boost::unit_test::expected_failures
is available, so can remove theHAVE_EXPECTED_FAILURES
guard macro.BOOST_TEST_PRINT_NAMESPACE_OPEN
doesn't need to switch the namespace
- Many "Polyfills" un
1.64
- Boost test
- Boost test print helper for
nullptr_t
exists, can remove our polyfill - The
boost_test_print_type
customisation point exists and the old code usingBOOST_TEST_PRINT_NAMESPACE_OPEN
can be converted to use that.
- Boost test print helper for
CMake
Current versions:
3.1
- Can remove CMake policy CMP0025 from root CMake
3.3
- Can remove check for CMake policy CMP0063 entirely (the policy exists as of v3.3 and the default is correct).
3.5
- Can use
target_link_libraries(foo Boost::boost)
for Boost header-only libraries, rather than${Boost_INCLUDE_DIRS}
. C.f. Github commit
OpenSSL
Current versions:
1.1.0
- Can remove all locking code from
kicad_curl.cpp
. From v1.1.0, this is no longer required. C.f. OpenSSL issue 1260
wxWidgets
Current versions:
3.1
This is a development release, but it brings its own set of features and fixes. Most of these will not be available in general distributions until v3.2.
- DPI scaling on GTK+ available (also needs GTK+ 3.10).
C.f. this commit
dpi_scaling.cpp
should continue to work normally, but the config should no longer be required and the scaling should auto-detect.