[Scummvm-git-logs] scummvm master -> 18ebbdcf990b539dee14be507239bc3ce2960aac

SupSuper noreply at scummvm.org
Mon Apr 25 05:47:10 UTC 2022


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
d2ad40a7a1 CREATE_PROJECT: Fix missing prefix in CMake engines
18ebbdcf99 CREATE_PROJECT: Don't add GCC warnings to MSVC CMake


Commit: d2ad40a7a1e550b315d961db32e869da50ad246f
    https://github.com/scummvm/scummvm/commit/d2ad40a7a1e550b315d961db32e869da50ad246f
Author: SupSuper (supsuper at gmail.com)
Date: 2022-04-25T06:28:40+01:00

Commit Message:
CREATE_PROJECT: Fix missing prefix in CMake engines

Changed paths:
    devtools/create_project/cmake.cpp


diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index eefa2e6b63a..6a29ee24711 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -283,7 +283,7 @@ void CMakeProvider::createProjectFile(const std::string &name, const std::string
 		project << "add_library(" << name << "\n";
 	} else {
 		enginesStr << "add_engine(" << name << "\n";
-		addFilesToProject(moduleDir, enginesStr, includeList, excludeList, {});
+		addFilesToProject(moduleDir, enginesStr, includeList, excludeList, filePrefix(setup, moduleDir));
 		enginesStr << ")\n\n";
 		return;
 	}


Commit: 18ebbdcf990b539dee14be507239bc3ce2960aac
    https://github.com/scummvm/scummvm/commit/18ebbdcf990b539dee14be507239bc3ce2960aac
Author: SupSuper (supsuper at gmail.com)
Date: 2022-04-25T06:46:28+01:00

Commit Message:
CREATE_PROJECT: Don't add GCC warnings to MSVC CMake

Changed paths:
    devtools/create_project/cmake.cpp
    devtools/create_project/create_project.cpp


diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index 6a29ee24711..806992d29ff 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -322,11 +322,15 @@ void CMakeProvider::createProjectFile(const std::string &name, const std::string
 }
 
 void CMakeProvider::writeWarnings(std::ofstream &output) const {
-	output << "set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}";
+	output << "if (MSVC)\n";
+	// TODO: Support MSVC warnings
+	output << "else()\n";
+	output << "\tset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS}";
 	for (const std::string &warning : _globalWarnings) {
 		output << ' ' << warning;
 	}
 	output << "\")\n";
+	output << "endif()\n";
 }
 
 void CMakeProvider::writeDefines(const BuildSetup &setup, std::ofstream &output) const {
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 6905ffae521..dc97fd8a02a 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -641,29 +641,7 @@ int main(int argc, char *argv[]) {
 			return -1;
 		}
 
-		////////////////////////////////////////////////////////////////////////////
-		// Xcode is also using GCC behind the scenes. See Code::Blocks comment
-		// for info on all warnings
-		////////////////////////////////////////////////////////////////////////////
-		globalWarnings.push_back("-Wall");
-		globalWarnings.push_back("-Wno-long-long");
-		globalWarnings.push_back("-Wno-multichar");
-		globalWarnings.push_back("-Wno-unknown-pragmas");
-		globalWarnings.push_back("-Wno-reorder");
-		globalWarnings.push_back("-Wpointer-arith");
-		globalWarnings.push_back("-Wcast-qual");
-		globalWarnings.push_back("-Wcast-align");
-		globalWarnings.push_back("-Wshadow");
-		globalWarnings.push_back("-Wimplicit");
-		globalWarnings.push_back("-Wnon-virtual-dtor");
-		globalWarnings.push_back("-Wwrite-strings");
-		// The following are not warnings at all... We should consider adding them to
-		// a different list of parameters.
-#if !NEEDS_RTTI
-		globalWarnings.push_back("-fno-rtti");
-#endif
-		globalWarnings.push_back("-fno-exceptions");
-		globalWarnings.push_back("-fcheck-new");
+		addGCCWarnings(globalWarnings);
 
 		provider = new CreateProjectTool::XcodeProvider(globalWarnings, projectWarnings);
 		break;
@@ -805,10 +783,14 @@ void addGCCWarnings(StringList &globalWarnings) {
 	globalWarnings.push_back("-Wcast-qual");
 	globalWarnings.push_back("-Wcast-align");
 	globalWarnings.push_back("-Wshadow");
+	globalWarnings.push_back("-Wimplicit");
 	globalWarnings.push_back("-Wnon-virtual-dtor");
 	globalWarnings.push_back("-Wwrite-strings");
 	// The following are not warnings at all... We should consider adding them to
 	// a different list of parameters.
+#if !NEEDS_RTTI
+	globalWarnings.push_back("-fno-rtti");
+#endif
 	globalWarnings.push_back("-fno-exceptions");
 	globalWarnings.push_back("-fcheck-new");
 }




More information about the Scummvm-git-logs mailing list