r24860 by craig - Better C++ version condition

scribus-commit scribus-commit at lists.scribus.net
Sun Jan 30 15:43:32 UTC 2022


Author: craig
Date: Sun Jan 30 15:43:32 2022
New Revision: 24860

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24860
Log:
Better C++ version condition

Modified:
    trunk/Scribus/CMakeLists.txt

Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24860&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/CMakeLists.txt	Sun Jan 30 15:43:32 2022
@@ -397,17 +397,17 @@
 #as of 1.7.0.svn, require C++17
 #yes the below conditions suggest 20/23 support. Yeah, nah..
 set (WANT_CPP17 ON)
-
-if(NOT WANT_CPP20 AND NOT WANT_CPP23)
+if(WANT_CPP17)
 	message(STATUS "Enabling C++17 compiler features")
 	set(CMAKE_CXX_STANDARD 17)
-endif()
-if (WANT_CPP20)
-	message(STATUS "Enabling C++20 compiler features")
-	set(CMAKE_CXX_STANDARD 20)
-elseif(WANT_CPP23)
-	    message(STATUS "Enabling C++23 compiler features")
+else()
+	if (WANT_CPP20)
+		message(STATUS "Enabling C++20 compiler features")
+		set(CMAKE_CXX_STANDARD 20)
+	elseif(WANT_CPP23)
+		message(STATUS "Enabling C++23 compiler features")
 		set(CMAKE_CXX_STANDARD 23)
+	endif()
 endif()
 set (CMAKE_CXX_STANDARD_REQUIRED ON)
 set (CMAKE_CXX_EXTENSIONS OFF)




More information about the scribus-commit mailing list