diff options
author | Brad King <brad.king@kitware.com> | 2020-04-28 11:16:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-04-28 11:17:13 (GMT) |
commit | d7a1d0dc4364ce3e46458a22c5f60f0c54b945d4 (patch) | |
tree | a27e87b88f8238f73419a44a5196ee1538dd64e5 /Source | |
parent | 75f7b665175fe897de60556a31c6737990d89fe5 (diff) | |
parent | 7a0c17f7041e635d089f16c056b7f1468804f3ed (diff) | |
download | CMake-d7a1d0dc4364ce3e46458a22c5f60f0c54b945d4.zip CMake-d7a1d0dc4364ce3e46458a22c5f60f0c54b945d4.tar.gz CMake-d7a1d0dc4364ce3e46458a22c5f60f0c54b945d4.tar.bz2 |
Merge topic 'cmake-gui-empty-compiler'
7a0c17f704 cmake-gui: Do not pass CMAKE_{C,CXX}_COMPILER items to cmake if empty
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4664
Diffstat (limited to 'Source')
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 4daf726..930f300 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -808,11 +808,15 @@ bool CMakeSetupDialog::setupFirstConfigure() m->insertProperty(QCMakeProperty::STRING, "CMAKE_SYSTEM_PROCESSOR", tr("CMake System Processor"), systemProcessor, false); QString cxxCompiler = dialog.getCXXCompiler(); - m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER", - tr("CXX compiler."), cxxCompiler, false); + if (!cxxCompiler.isEmpty()) { + m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_CXX_COMPILER", + tr("CXX compiler."), cxxCompiler, false); + } QString cCompiler = dialog.getCCompiler(); - m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER", - tr("C compiler."), cCompiler, false); + if (!cCompiler.isEmpty()) { + m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_C_COMPILER", + tr("C compiler."), cCompiler, false); + } } else if (dialog.crossCompilerToolChainFile()) { QString toolchainFile = dialog.getCrossCompilerToolChainFile(); m->insertProperty(QCMakeProperty::FILEPATH, "CMAKE_TOOLCHAIN_FILE", |