CREATE_PROJECT: fixed DeepCode warning

This commit is contained in:
Martin Gerhardy 2020-10-19 17:20:10 +02:00 committed by Eugene Sandulenko
parent 332c826b4b
commit 813b497955

View File

@ -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"