diff options
author | Craig Scott <craig.scott@crascit.com> | 2022-05-18 13:29:21 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2022-05-24 22:46:18 (GMT) |
commit | 2aa83fa15b01941f0267e20a1a4e29793651fefd (patch) | |
tree | 7cd1ba4d72b087094815716e53f8a90fee035205 /Source/cmGlobalGenerator.cxx | |
parent | 8a28368feb938f301604c24c0294e2a25749cc77 (diff) | |
download | CMake-2aa83fa15b01941f0267e20a1a4e29793651fefd.zip CMake-2aa83fa15b01941f0267e20a1a4e29793651fefd.tar.gz CMake-2aa83fa15b01941f0267e20a1a4e29793651fefd.tar.bz2 |
Dependency providers: Add find_package and FetchContent support
Fixes: #22619
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 3831546..12ae983 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -690,6 +690,7 @@ void cmGlobalGenerator::EnableLanguage( } // One-time includes of user-provided project setup files + mf->GetState()->SetInTopLevelIncludes(true); std::string includes = mf->GetSafeDefinition("CMAKE_PROJECT_TOP_LEVEL_INCLUDES"); std::vector<std::string> includesList = cmExpandedList(includes); @@ -700,22 +701,26 @@ void cmGlobalGenerator::EnableLanguage( cmSystemTools::Error( "CMAKE_PROJECT_TOP_LEVEL_INCLUDES file does not exist: " + setupFile); + mf->GetState()->SetInTopLevelIncludes(false); return; } if (cmSystemTools::FileIsDirectory(absSetupFile)) { cmSystemTools::Error( "CMAKE_PROJECT_TOP_LEVEL_INCLUDES file is a directory: " + setupFile); + mf->GetState()->SetInTopLevelIncludes(false); return; } if (!mf->ReadListFile(absSetupFile)) { cmSystemTools::Error( "Failed reading CMAKE_PROJECT_TOP_LEVEL_INCLUDES file: " + setupFile); + mf->GetState()->SetInTopLevelIncludes(false); return; } } } + mf->GetState()->SetInTopLevelIncludes(false); // Check that the languages are supported by the generator and its // native build tool found above. |