mirror of
https://github.com/transmission/transmission
synced 2025-02-21 21:57:01 +00:00
Use CMake-provided C/C++ standard selection capabilities; fix build (qtr.pro)
This commit is contained in:
parent
fd9c2c74f4
commit
0f9bdc6ac2
3 changed files with 13 additions and 4 deletions
|
@ -338,10 +338,19 @@ if(WIN32)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||
if(CMAKE_VERSION VERSION_LESS "3.1")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(NEEDED_COMPILER_FLAGS
|
||||
-Wall
|
||||
-W
|
||||
|
|
|
@ -285,7 +285,6 @@ QString
|
|||
TorrentDelegate::shortStatusString (const Torrent& tor)
|
||||
{
|
||||
QString str;
|
||||
static const QChar ratioSymbol (0x262F);
|
||||
|
||||
switch (tor.getActivity ())
|
||||
{
|
||||
|
|
|
@ -55,6 +55,7 @@ TRANSLATIONS += translations/transmission_en.ts \
|
|||
|
||||
FORMS += AboutDialog.ui \
|
||||
DetailsDialog.ui \
|
||||
LicenseDialog.ui \
|
||||
MainWindow.ui \
|
||||
MakeDialog.ui \
|
||||
MakeProgressDialog.ui \
|
||||
|
|
Loading…
Reference in a new issue