[Scummvm-git-logs] scummvm master -> 813b497955673af45cd95ecb67196dbaa7a1bacf

sev- sev at scummvm.org
Mon Oct 19 18:24:59 UTC 2020


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:
332c826b4b CREATE_PROJECT: export compile_commands.json via cmake
813b497955 CREATE_PROJECT: fixed DeepCode warning


Commit: 332c826b4b7e268c6f6716e67e207b1029ca0755
    https://github.com/scummvm/scummvm/commit/332c826b4b7e268c6f6716e67e207b1029ca0755
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2020-10-19T20:24:54+02:00

Commit Message:
CREATE_PROJECT: export compile_commands.json via cmake

this is useful for e.g. clangd or other clang based tools like the analyser

Changed paths:
    devtools/create_project/cmake.cpp


diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index 6eb4eabab8..aef4a1a539 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -81,6 +81,8 @@ void CMakeProvider::createWorkspace(const BuildSetup &setup) {
 	workspace << "cmake_minimum_required(VERSION 3.2)\n"
 			"project(" << setup.projectDescription << ")\n\n";
 
+	workspace << "set(CMAKE_EXPORT_COMPILE_COMMANDS ON)\n";
+
 	workspace << "# Define the engines and subengines\n";
 	writeEngines(setup, workspace);
 	writeSubEngines(setup, workspace);


Commit: 813b497955673af45cd95ecb67196dbaa7a1bacf
    https://github.com/scummvm/scummvm/commit/813b497955673af45cd95ecb67196dbaa7a1bacf
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2020-10-19T20:24:54+02:00

Commit Message:
CREATE_PROJECT: fixed DeepCode warning

Changed paths:
    devtools/create_project/cmake.cpp


diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index aef4a1a539..9dcb7233ac 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -75,7 +75,7 @@ const CMakeProvider::Library *CMakeProvider::getLibraryFromFeature(const char *f
 void CMakeProvider::createWorkspace(const BuildSetup &setup) {
 	std::string filename = setup.outputDir + "/CMakeLists.txt";
 	std::ofstream workspace(filename.c_str());
-	if (!workspace)
+	if (!workspace || !workspace.is_open())
 		error("Could not open \"" + filename + "\" for writing");
 
 	workspace << "cmake_minimum_required(VERSION 3.2)\n"




More information about the Scummvm-git-logs mailing list