]> granicus.if.org Git - transmission/commitdiff
Use CMake-provided C/C++ standard selection capabilities; fix build (qtr.pro)
authorMike Gelfand <mikedld@mikedld.com>
Sat, 1 Aug 2015 16:05:02 +0000 (16:05 +0000)
committerMike Gelfand <mikedld@mikedld.com>
Sat, 1 Aug 2015 16:05:02 +0000 (16:05 +0000)
CMakeLists.txt
qt/TorrentDelegate.cc
qt/qtr.pro

index 3df3617a269427e17512b47253e8bd4f0003cdb1..89564bd22400206e251552472ef0d7d551dd24a5 100644 (file)
@@ -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
index dfc3d08bdadfa42f0d06d8ccfa4b127b98e38912..3d8483df72473de7ef8f0866279f3e43c0b6de73 100644 (file)
@@ -285,7 +285,6 @@ QString
 TorrentDelegate::shortStatusString (const Torrent& tor)
 {
   QString str;
-  static const QChar ratioSymbol (0x262F);
 
   switch (tor.getActivity ())
     {
index 45266f6c3646a7ad21ac11d1714ac68ebee1a3b6..98fae12b6d9aa9b31f7803968881f1232155f53a 100644 (file)
@@ -55,6 +55,7 @@ TRANSLATIONS += translations/transmission_en.ts \
 
 FORMS += AboutDialog.ui \
          DetailsDialog.ui \
+         LicenseDialog.ui \
          MainWindow.ui \
          MakeDialog.ui \
          MakeProgressDialog.ui \