Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
57 | find_package(KChart 2.6.0 REQUIRED) | 57 | find_package(KChart 2.6.0 REQUIRED) | ||
58 | 58 | | |||
59 | if(KF5Gpgmepp_FOUND) | 59 | if(KF5Gpgmepp_FOUND) | ||
60 | set(GPG_ENCRYPTION "yes") | 60 | set(GPG_ENCRYPTION "yes") | ||
61 | add_definitions(-DGpgmepp_FOUND) | 61 | add_definitions(-DGpgmepp_FOUND) | ||
62 | endif() | 62 | endif() | ||
63 | 63 | | |||
64 | add_definitions(-DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_TO_ASCII -DQT_NO_URL_CAST_FROM_STRING) | 64 | add_definitions(-DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_TO_ASCII -DQT_NO_URL_CAST_FROM_STRING) | ||
65 | if(NOT MSVC) | 65 | if(NOT MSVC) # MSVC has no regular standards version switches | ||
christiand: Removing the MSVC check will cause annoying compiler warnings. | |||||
Will MSVC compile c++14 code correctly with that check left untouched? wojnilowicz: Will MSVC compile c++14 code correctly with that check left untouched? | |||||
Yes. MSVC does not know this switch, so it will generate a warning for every invocation (about the number of .cpp files we have). MSVC always compiles with all features it knows (which can be C++17 or any Microsoft specific addition). christiand: Yes. MSVC does not know this switch, so it will generate a warning for //every// invocation… | |||||
66 | # Temporary solution until all targets have compile features set | 66 | add_compile_options(-std=c++14) | ||
christiand: This comment is still valid. | |||||
Have you seen this? According to that website GCC's an MSVC's capabilities for c++14 are equal, so how this comment be still valid? wojnilowicz: Have you seen [[ http://en.cppreference.com/w/cpp/compiler_support | this ]]? According to that… | |||||
This comment refers to CMake's compile features. They should make the compiler flag settings compiler (and compiler version) independent (note: the option -std=c++** works probably only for GCC and clang – and we can be happy that this are two compilers already). christiand: This comment refers to CMake's [[ https://cmake.org/cmake/help/latest/manual/cmake-compile… | |||||
67 | add_compile_options(-std=c++11) | | |||
68 | endif() | 67 | endif() | ||
69 | 68 | | |||
70 | # use DBus only on Linux | 69 | # use DBus only on Linux | ||
71 | if(CMAKE_SYSTEM_NAME MATCHES "Linux") | 70 | if(CMAKE_SYSTEM_NAME MATCHES "Linux") | ||
72 | set(KMM_DBUS 1) | 71 | set(KMM_DBUS 1) | ||
73 | endif() | 72 | endif() | ||
74 | 73 | | |||
75 | set(CMAKE_INCLUDE_CURRENT_DIR ON) | 74 | set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
▲ Show 20 Lines • Show All 244 Lines • Show Last 20 Lines |
Removing the MSVC check will cause annoying compiler warnings.