set(files foo.csproj bar.csproj baz.csproj) set(inLib1 FALSE) set(dotnetSdkInLib1 FALSE) set(inLib2 FALSE) set(dotnetSdkWebInLib2 FALSE) set(inLib3 FALSE) set(classicProjInLib3 FALSE) foreach(file ${files}) set(csProjectFile ${RunCMake_TEST_BINARY_DIR}/${file}) if(NOT EXISTS "${csProjectFile}") set(RunCMake_TEST_FAILED "Project file ${csProjectFile} does not exist.") return() endif() file(STRINGS "${csProjectFile}" lines) foreach(line IN LISTS lines) if(NOT inLib1) if(line MATCHES "") set(dotnetSdkInLib1 TRUE) set(inLib1 TRUE) endif() elseif(NOT inLib2) if(line MATCHES "") set(dotnetSdkWebInLib2 TRUE) set(inLib2 TRUE) endif() elseif(NOT inLib3) if(line MATCHES "