diff options
author | Claus Steuer <claus755@gmail.com> | 2017-06-19 17:21:38 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2017-06-20 13:37:17 +0000 |
commit | 523439d71b768874b2ac9613c151483f9961417f (patch) | |
tree | 833d16f46586b2e3889819535bf752322bf70b49 | |
parent | 0652297f5adaacee924d3d4fbaaf1db205432f54 (diff) |
CMake: The first build of a cmake project always fails in tealeaf mode
The TeaLeafReader tries to parse the CMakeCache.txt before cmake is
executed for the first time.
The error is signaled to the CMakeBuildStep which reports the build as a
failure.
Make TeaLeafReader::takeParsedConfiguration return an empty
CMakeConfig object if the CMakeCache.txt file does not exist instead,
but do not report an error.
Task-number: QTCREATORBUG-18290
Change-Id: Ibfc43858938477ae7479029e8fe6786c77823014
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r-- | src/plugins/cmakeprojectmanager/tealeafreader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/cmakeprojectmanager/tealeafreader.cpp b/src/plugins/cmakeprojectmanager/tealeafreader.cpp index 8c37220f26..c05b0bf9c1 100644 --- a/src/plugins/cmakeprojectmanager/tealeafreader.cpp +++ b/src/plugins/cmakeprojectmanager/tealeafreader.cpp @@ -243,6 +243,10 @@ CMakeConfig TeaLeafReader::takeParsedConfiguration() { FileName cacheFile = m_parameters.buildDirectory; cacheFile.appendPath(QLatin1String("CMakeCache.txt")); + + if (!cacheFile.exists()) + return { }; + QString errorMessage; CMakeConfig result = BuildDirManager::parseConfiguration(cacheFile, &errorMessage); |