diff options
-rw-r--r-- | .gitlab/ci/configure_fedora31_ninja.cmake | 4 | ||||
-rw-r--r-- | .gitlab/ci/ctest_test.cmake | 5 | ||||
-rw-r--r-- | .gitlab/os-macos.yml | 2 | ||||
-rw-r--r-- | .gitlab/os-windows.yml | 2 | ||||
-rw-r--r-- | Modules/CMakeGenericSystem.cmake | 4 | ||||
-rw-r--r-- | Modules/FindJNI.cmake | 2 | ||||
-rw-r--r-- | Modules/FindPackageHandleStandardArgs.cmake | 2 | ||||
-rw-r--r-- | Modules/FindPkgConfig.cmake | 12 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/QtDialog/AddCacheEntry.cxx | 6 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 252 | ||||
-rw-r--r-- | Source/QtDialog/FirstConfigure.cxx | 33 | ||||
-rw-r--r-- | Source/QtDialog/FirstConfigure.h | 2 | ||||
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.cxx | 8 | ||||
-rw-r--r-- | Source/QtDialog/QCMakeWidgets.cxx | 4 | ||||
-rw-r--r-- | Source/QtDialog/WarningMessagesDialog.cxx | 24 | ||||
-rw-r--r-- | Source/cmSystemTools.cxx | 3 | ||||
-rw-r--r-- | Source/cmTimestamp.cxx | 3 | ||||
-rw-r--r-- | Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 23 | ||||
-rw-r--r-- | Utilities/cmlibuv/CMakeLists.txt | 18 | ||||
-rwxr-xr-x | bootstrap | 4 |
21 files changed, 245 insertions, 170 deletions
diff --git a/.gitlab/ci/configure_fedora31_ninja.cmake b/.gitlab/ci/configure_fedora31_ninja.cmake index 2743412..ea429c1 100644 --- a/.gitlab/ci/configure_fedora31_ninja.cmake +++ b/.gitlab/ci/configure_fedora31_ninja.cmake @@ -1,3 +1,7 @@ set(CMake_TEST_ISPC "ON" CACHE STRING "") set(CMake_TEST_GUI "ON" CACHE BOOL "") + +# Cover compilation with C++11 only and not higher standards. +set(CMAKE_CXX_STANDARD "11" CACHE STRING "") + include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora31_common.cmake") diff --git a/.gitlab/ci/ctest_test.cmake b/.gitlab/ci/ctest_test.cmake index 569139d..08ef18f 100644 --- a/.gitlab/ci/ctest_test.cmake +++ b/.gitlab/ci/ctest_test.cmake @@ -10,6 +10,11 @@ ctest_start(APPEND) include(ProcessorCount) ProcessorCount(nproc) +if (NOT "$ENV{CTEST_MAX_PARALLELISM}" STREQUAL "") + if (nproc GREATER "$ENV{CTEST_MAX_PARALLELISM}") + set(nproc "$ENV{CTEST_MAX_PARALLELISM}") + endif () +endif () include("${CMAKE_CURRENT_LIST_DIR}/ctest_exclusions.cmake") ctest_test( diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml index 96ec264..47e81d1 100644 --- a/.gitlab/os-macos.yml +++ b/.gitlab/os-macos.yml @@ -8,6 +8,8 @@ # TODO: Factor this out so that each job selects the Xcode version to # use so that different versions can be tested in a single pipeline. DEVELOPER_DIR: "/Applications/Xcode-11.7.app/Contents/Developer" + # Avoid conflicting with other projects running on the same machine. + SCCACHE_SERVER_PORT: 4227 ### Build and test diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index 63b8758..61a2018 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -5,6 +5,8 @@ .windows: variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR\\cmake ci ext\\$CI_CONCURRENT_ID" + # Avoid conflicting with other projects running on the same machine. + SCCACHE_SERVER_PORT: 4227 ### Build and test diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake index 6f665a6..649b6f7 100644 --- a/Modules/CMakeGenericSystem.cmake +++ b/Modules/CMakeGenericSystem.cmake @@ -77,10 +77,14 @@ function(GetDefaultWindowsPrefixBase var) # if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)") set(arch_hint "x64") + elseif("${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64") + set(arch_hint "x64") elseif("${CMAKE_GENERATOR_PLATFORM}" MATCHES "ARM64") set(arch_hint "ARM64") elseif("${CMAKE_GENERATOR}" MATCHES "ARM") set(arch_hint "ARM") + elseif("${CMAKE_GENERATOR_PLATFORM}" MATCHES "ARM") + set(arch_hint "ARM") elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") set(arch_hint "x64") elseif("$ENV{LIB}" MATCHES "(amd64|ia64)") diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index eff815d..bbca952 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -60,7 +60,7 @@ macro(java_append_library_directories _var) elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$") set(_java_libarch "i386") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") - set(_java_libarch "arm64") + set(_java_libarch "arm64" "aarch64") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha") set(_java_libarch "alpha") elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake index 4d252bc..b06433d 100644 --- a/Modules/FindPackageHandleStandardArgs.cmake +++ b/Modules/FindPackageHandleStandardArgs.cmake @@ -531,7 +531,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) else() set(FPCV_HANDLE_VERSION_RANGE NO_AUTHOR_WARNING_VERSION_RANGE) endif() - find_package_check_version (${_FOUND_VERSION} VERSION_OK RESULT_MESSAGE_VARIABLE VERSION_MSG + find_package_check_version ("${_FOUND_VERSION}" VERSION_OK RESULT_MESSAGE_VARIABLE VERSION_MSG ${FPCV_HANDLE_VERSION_RANGE}) else() # if the package was not found, but a version was given, add that to the output: diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 93827d8..2ad2c7e 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -31,7 +31,13 @@ set(PKG_CONFIG_VERSION 1) if((NOT PKG_CONFIG_EXECUTABLE) AND (NOT "$ENV{PKG_CONFIG}" STREQUAL "")) set(PKG_CONFIG_EXECUTABLE "$ENV{PKG_CONFIG}" CACHE FILEPATH "pkg-config executable") endif() -find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable") + +set(PKG_CONFIG_NAMES "pkg-config") +if(CMAKE_HOST_WIN32) + list(PREPEND PKG_CONFIG_NAMES "pkg-config.bat") +endif() + +find_program(PKG_CONFIG_EXECUTABLE NAMES ${PKG_CONFIG_NAMES} DOC "pkg-config executable") mark_as_advanced(PKG_CONFIG_EXECUTABLE) set(_PKG_CONFIG_FAILURE_MESSAGE "") @@ -47,7 +53,9 @@ if (PKG_CONFIG_EXECUTABLE) string(APPEND _PKG_CONFIG_FAILURE_MESSAGE "The command\n" " \"${PKG_CONFIG_EXECUTABLE}\" --version\n" - " failed with output\n${_PKG_CONFIG_VERSION_ERROR}" + " failed with output:\n${PKG_CONFIG_VERSION_STRING}\n" + " stderr: \n${_PKG_CONFIG_VERSION_ERROR}\n" + " result: \n${_PKG_CONFIG_VERSION_RESULT}" ) set(PKG_CONFIG_EXECUTABLE "") unset(PKG_CONFIG_VERSION_STRING) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index df989fa..818b1bd 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 18) -set(CMake_VERSION_PATCH 20200925) +set(CMake_VERSION_PATCH 20200929) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/QtDialog/AddCacheEntry.cxx b/Source/QtDialog/AddCacheEntry.cxx index f5e0777..1075895 100644 --- a/Source/QtDialog/AddCacheEntry.cxx +++ b/Source/QtDialog/AddCacheEntry.cxx @@ -40,8 +40,10 @@ AddCacheEntry::AddCacheEntry(QWidget* p, const QStringList& varNames, AddCacheEntry::setTabOrder(string, this->Description); QCompleter* completer = new QCompleter(this->VarNames, this); this->Name->setCompleter(completer); - connect(completer, SIGNAL(activated(const QString&)), this, - SLOT(onCompletionActivated(const QString&))); + connect( + completer, + static_cast<void (QCompleter::*)(const QString&)>(&QCompleter::activated), + this, &AddCacheEntry::onCompletionActivated); } QString AddCacheEntry::name() const diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index fcc8408..f6bde8f 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -103,76 +103,87 @@ CMakeSetupDialog::CMakeSetupDialog() QMenu* FileMenu = this->menuBar()->addMenu(tr("&File")); this->ReloadCacheAction = FileMenu->addAction(tr("&Reload Cache")); - QObject::connect(this->ReloadCacheAction, SIGNAL(triggered(bool)), this, - SLOT(doReloadCache())); + QObject::connect(this->ReloadCacheAction, &QAction::triggered, this, + &CMakeSetupDialog::doReloadCache); this->DeleteCacheAction = FileMenu->addAction(tr("&Delete Cache")); - QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)), this, - SLOT(doDeleteCache())); + QObject::connect(this->DeleteCacheAction, &QAction::triggered, this, + &CMakeSetupDialog::doDeleteCache); this->ExitAction = FileMenu->addAction(tr("E&xit")); - this->ExitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); - QObject::connect(this->ExitAction, SIGNAL(triggered(bool)), this, - SLOT(close())); + QObject::connect(this->ExitAction, &QAction::triggered, this, + &CMakeSetupDialog::close); + this->ExitAction->setShortcut(QKeySequence::Quit); QMenu* ToolsMenu = this->menuBar()->addMenu(tr("&Tools")); this->ConfigureAction = ToolsMenu->addAction(tr("&Configure")); + QObject::connect(this->ConfigureAction, &QAction::triggered, this, + &CMakeSetupDialog::doConfigure); // prevent merging with Preferences menu item on macOS this->ConfigureAction->setMenuRole(QAction::NoRole); - QObject::connect(this->ConfigureAction, SIGNAL(triggered(bool)), this, - SLOT(doConfigure())); this->GenerateAction = ToolsMenu->addAction(tr("&Generate")); - QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)), this, - SLOT(doGenerate())); - QAction* showChangesAction = ToolsMenu->addAction(tr("&Show My Changes")); - QObject::connect(showChangesAction, SIGNAL(triggered(bool)), this, - SLOT(showUserChanges())); + QObject::connect(this->GenerateAction, &QAction::triggered, this, + &CMakeSetupDialog::doGenerate); + auto* a = ToolsMenu->addAction(tr("&Show My Changes")); + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::showUserChanges); #if defined(Q_WS_MAC) || defined(Q_OS_MAC) this->InstallForCommandLineAction = ToolsMenu->addAction(tr("&How to Install For Command Line Use")); - QObject::connect(this->InstallForCommandLineAction, SIGNAL(triggered(bool)), - this, SLOT(doInstallForCommandLine())); + QObject::connect(this->InstallForCommandLineAction, &QAction::triggered, + this, &CMakeSetupDialog::doInstallForCommandLine); #endif ToolsMenu->addSeparator(); - ToolsMenu->addAction(tr("Regular Expression Explorer..."), this, - SLOT(doRegexExplorerDialog())); + a = ToolsMenu->addAction(tr("Regular Expression Explorer...")); + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::doRegexExplorerDialog); ToolsMenu->addSeparator(); - ToolsMenu->addAction(tr("&Find in Output..."), this, - SLOT(doOutputFindDialog()), QKeySequence::Find); - ToolsMenu->addAction(tr("Find Next"), this, SLOT(doOutputFindNext()), - QKeySequence::FindNext); - ToolsMenu->addAction(tr("Find Previous"), this, SLOT(doOutputFindPrev()), - QKeySequence::FindPrevious); - ToolsMenu->addAction(tr("Goto Next Error"), this, SLOT(doOutputErrorNext()), - QKeySequence(Qt::Key_F8)); // in Visual Studio - new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Period), this, - SLOT(doOutputErrorNext())); // in Eclipse + a = ToolsMenu->addAction(tr("&Find in Output...")); + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::doOutputFindDialog); + a->setShortcut(QKeySequence::Find); + a = ToolsMenu->addAction(tr("Find Next")); + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::doOutputFindNext); + a->setShortcut(QKeySequence::FindNext); + a = ToolsMenu->addAction(tr("Find Previous")); + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::doOutputFindPrev); + a->setShortcut(QKeySequence::FindPrevious); + a = ToolsMenu->addAction(tr("Goto Next Error")); // in Visual Studio + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::doOutputErrorNext); + a->setShortcut(QKeySequence(Qt::Key_F8)); + auto* s = new QShortcut(this); + s->setKey(QKeySequence(Qt::CTRL + Qt::Key_Period)); + QObject::connect(s, &QShortcut::activated, this, + &CMakeSetupDialog::doOutputErrorNext); // in Eclipse QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options")); - OptionsMenu->addAction(tr("Warning Messages..."), this, - SLOT(doWarningMessagesDialog())); + a = OptionsMenu->addAction(tr("Warning Messages...")); + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::doWarningMessagesDialog); this->WarnUninitializedAction = OptionsMenu->addAction(tr("&Warn Uninitialized (--warn-uninitialized)")); this->WarnUninitializedAction->setCheckable(true); QAction* debugAction = OptionsMenu->addAction(tr("&Debug Output")); debugAction->setCheckable(true); - QObject::connect(debugAction, SIGNAL(toggled(bool)), this, - SLOT(setDebugOutput(bool))); + QObject::connect(debugAction, &QAction::toggled, this, + &CMakeSetupDialog::setDebugOutput); OptionsMenu->addSeparator(); - QAction* expandAction = - OptionsMenu->addAction(tr("&Expand Grouped Entries")); - QObject::connect(expandAction, SIGNAL(triggered(bool)), this->CacheValues, - SLOT(expandAll())); - QAction* collapseAction = - OptionsMenu->addAction(tr("&Collapse Grouped Entries")); - QObject::connect(collapseAction, SIGNAL(triggered(bool)), this->CacheValues, - SLOT(collapseAll())); + a = OptionsMenu->addAction(tr("&Expand Grouped Entries")); + QObject::connect(a, &QAction::triggered, this->CacheValues, + &QCMakeCacheView::expandAll); + a = OptionsMenu->addAction(tr("&Collapse Grouped Entries")); + QObject::connect(a, &QAction::triggered, this->CacheValues, + &QCMakeCacheView::collapseAll); QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help")); - QAction* a = HelpMenu->addAction(tr("About")); - QObject::connect(a, SIGNAL(triggered(bool)), this, SLOT(doAbout())); + a = HelpMenu->addAction(tr("About")); + QObject::connect(a, &QAction::triggered, this, &CMakeSetupDialog::doAbout); a = HelpMenu->addAction(tr("Help")); - QObject::connect(a, SIGNAL(triggered(bool)), this, SLOT(doHelp())); + QObject::connect(a, &QAction::triggered, this, &CMakeSetupDialog::doHelp); + a->setShortcut(QKeySequence::HelpContents); this->setAcceptDrops(true); @@ -189,16 +200,16 @@ CMakeSetupDialog::CMakeSetupDialog() this->ErrorFormat.setForeground(QBrush(Qt::red)); this->Output->setContextMenuPolicy(Qt::CustomContextMenu); - connect(this->Output, SIGNAL(customContextMenuRequested(const QPoint&)), - this, SLOT(doOutputContextMenu(const QPoint&))); + connect(this->Output, &QTextEdit::customContextMenuRequested, this, + &CMakeSetupDialog::doOutputContextMenu); // disable open project button this->OpenProjectButton->setDisabled(true); // start the cmake worker thread this->CMakeThread = new QCMakeThread(this); - QObject::connect(this->CMakeThread, SIGNAL(cmakeInitialized()), this, - SLOT(initialize()), Qt::QueuedConnection); + QObject::connect(this->CMakeThread, &QCMakeThread::cmakeInitialized, this, + &CMakeSetupDialog::initialize, Qt::QueuedConnection); this->CMakeThread->start(); this->enterState(ReadyConfigure); @@ -211,82 +222,79 @@ void CMakeSetupDialog::initialize() { // now the cmake worker thread is running, lets make our connections to it QObject::connect(this->CMakeThread->cmakeInstance(), - SIGNAL(propertiesChanged(const QCMakePropertyList&)), - this->CacheValues->cacheModel(), - SLOT(setProperties(const QCMakePropertyList&))); + &QCMake::propertiesChanged, this->CacheValues->cacheModel(), + &QCMakeCacheModel::setProperties); - QObject::connect(this->ConfigureButton, SIGNAL(clicked(bool)), this, - SLOT(doConfigure())); + QObject::connect(this->ConfigureButton, &QPushButton::clicked, this, + &CMakeSetupDialog::doConfigure); - QObject::connect(this->CMakeThread->cmakeInstance(), - SIGNAL(configureDone(int)), this, SLOT(exitLoop(int))); - QObject::connect(this->CMakeThread->cmakeInstance(), - SIGNAL(generateDone(int)), this, SLOT(exitLoop(int))); + QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::configureDone, + this, &CMakeSetupDialog::exitLoop); + QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::generateDone, + this, &CMakeSetupDialog::exitLoop); - QObject::connect(this->GenerateButton, SIGNAL(clicked(bool)), this, - SLOT(doGenerate())); - QObject::connect(this->OpenProjectButton, SIGNAL(clicked(bool)), this, - SLOT(doOpenProject())); + QObject::connect(this->GenerateButton, &QPushButton::clicked, this, + &CMakeSetupDialog::doGenerate); + QObject::connect(this->OpenProjectButton, &QPushButton::clicked, this, + &CMakeSetupDialog::doOpenProject); - QObject::connect(this->BrowseSourceDirectoryButton, SIGNAL(clicked(bool)), - this, SLOT(doSourceBrowse())); - QObject::connect(this->BrowseBinaryDirectoryButton, SIGNAL(clicked(bool)), - this, SLOT(doBinaryBrowse())); + QObject::connect(this->BrowseSourceDirectoryButton, &QPushButton::clicked, + this, &CMakeSetupDialog::doSourceBrowse); + QObject::connect(this->BrowseBinaryDirectoryButton, &QPushButton::clicked, + this, &CMakeSetupDialog::doBinaryBrowse); - QObject::connect(this->BinaryDirectory, SIGNAL(editTextChanged(QString)), - this, SLOT(onBinaryDirectoryChanged(QString))); - QObject::connect(this->SourceDirectory, SIGNAL(textChanged(QString)), this, - SLOT(onSourceDirectoryChanged(QString))); + QObject::connect(this->BinaryDirectory, &QComboBox::editTextChanged, this, + &CMakeSetupDialog::onBinaryDirectoryChanged); + QObject::connect(this->SourceDirectory, &QLineEdit::textChanged, this, + &CMakeSetupDialog::onSourceDirectoryChanged); QObject::connect(this->CMakeThread->cmakeInstance(), - SIGNAL(sourceDirChanged(QString)), this, - SLOT(updateSourceDirectory(QString))); + &QCMake::sourceDirChanged, this, + &CMakeSetupDialog::updateSourceDirectory); QObject::connect(this->CMakeThread->cmakeInstance(), - SIGNAL(binaryDirChanged(QString)), this, - SLOT(updateBinaryDirectory(QString))); + &QCMake::binaryDirChanged, this, + &CMakeSetupDialog::updateBinaryDirectory); QObject::connect(this->CMakeThread->cmakeInstance(), - SIGNAL(progressChanged(QString, float)), this, - SLOT(showProgress(QString, float))); + &QCMake::progressChanged, this, + &CMakeSetupDialog::showProgress); - QObject::connect(this->CMakeThread->cmakeInstance(), - SIGNAL(errorMessage(QString)), this, SLOT(error(QString))); + QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::errorMessage, + this, &CMakeSetupDialog::error); - QObject::connect(this->CMakeThread->cmakeInstance(), - SIGNAL(outputMessage(QString)), this, - SLOT(message(QString))); + QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::outputMessage, + this, &CMakeSetupDialog::message); - QObject::connect(this->CMakeThread->cmakeInstance(), - SIGNAL(openPossible(bool)), this->OpenProjectButton, - SLOT(setEnabled(bool))); + QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::openPossible, + this->OpenProjectButton, &CMakeSetupDialog::setEnabled); - QObject::connect(this->groupedCheck, SIGNAL(toggled(bool)), this, - SLOT(setGroupedView(bool))); - QObject::connect(this->advancedCheck, SIGNAL(toggled(bool)), this, - SLOT(setAdvancedView(bool))); - QObject::connect(this->Search, SIGNAL(textChanged(QString)), this, - SLOT(setSearchFilter(QString))); + QObject::connect(this->groupedCheck, &QCheckBox::toggled, this, + &CMakeSetupDialog::setGroupedView); + QObject::connect(this->advancedCheck, &QCheckBox::toggled, this, + &CMakeSetupDialog::setAdvancedView); + QObject::connect(this->Search, &QLineEdit::textChanged, this, + &CMakeSetupDialog::setSearchFilter); QObject::connect(this->CMakeThread->cmakeInstance(), - SIGNAL(generatorChanged(QString)), this, - SLOT(updateGeneratorLabel(QString))); + &QCMake::generatorChanged, this, + &CMakeSetupDialog::updateGeneratorLabel); this->updateGeneratorLabel(QString()); QObject::connect(this->CacheValues->cacheModel(), - SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, - SLOT(setCacheModified())); + &QCMakeCacheModel::dataChanged, this, + &CMakeSetupDialog::setCacheModified); QObject::connect(this->CacheValues->selectionModel(), - SIGNAL(selectionChanged(QItemSelection, QItemSelection)), - this, SLOT(selectionChanged())); - QObject::connect(this->RemoveEntry, SIGNAL(clicked(bool)), this, - SLOT(removeSelectedCacheEntries())); - QObject::connect(this->AddEntry, SIGNAL(clicked(bool)), this, - SLOT(addCacheEntry())); - - QObject::connect(this->WarnUninitializedAction, SIGNAL(triggered(bool)), + &QItemSelectionModel::selectionChanged, this, + &CMakeSetupDialog::selectionChanged); + QObject::connect(this->RemoveEntry, &QToolButton::clicked, this, + &CMakeSetupDialog::removeSelectedCacheEntries); + QObject::connect(this->AddEntry, &QToolButton::clicked, this, + &CMakeSetupDialog::addCacheEntry); + + QObject::connect(this->WarnUninitializedAction, &QAction::triggered, this->CMakeThread->cmakeInstance(), - SLOT(setWarnUninitializedMode(bool))); + &QCMake::setWarnUninitializedMode); if (!this->SourceDirectory->text().isEmpty() || !this->BinaryDirectory->lineEdit()->text().isEmpty()) { @@ -445,7 +453,8 @@ void CMakeSetupDialog::doInstallForCommandLine() lab->setTextInteractionFlags(Qt::TextSelectableByMouse); QDialogButtonBox* btns = new QDialogButtonBox(QDialogButtonBox::Ok, Qt::Horizontal, &dialog); - QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept())); + QObject::connect(btns, &QDialogButtonBox::accepted, &dialog, + &QDialog::accept); l->addWidget(btns); dialog.exec(); } @@ -602,7 +611,8 @@ void CMakeSetupDialog::doHelp() lab->setWordWrap(true); QDialogButtonBox* btns = new QDialogButtonBox(QDialogButtonBox::Ok, Qt::Horizontal, &dialog); - QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept())); + QObject::connect(btns, &QDialogButtonBox::accepted, &dialog, + &QDialog::accept); l->addWidget(lab); l->addWidget(btns); dialog.exec(); @@ -891,7 +901,8 @@ void CMakeSetupDialog::doAbout() lab->setWordWrap(true); QDialogButtonBox* btns = new QDialogButtonBox(QDialogButtonBox::Ok, Qt::Horizontal, &dialog); - QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept())); + QObject::connect(btns, &QDialogButtonBox::accepted, &dialog, + &QDialog::accept); l->addWidget(btns); dialog.exec(); } @@ -1074,8 +1085,10 @@ void CMakeSetupDialog::addCacheEntry() new AddCacheEntry(&dialog, this->AddVariableNames, this->AddVariableTypes); QDialogButtonBox* btns = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dialog); - QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept())); - QObject::connect(btns, SIGNAL(rejected()), &dialog, SLOT(reject())); + QObject::connect(btns, &QDialogButtonBox::accepted, &dialog, + &QDialog::accept); + QObject::connect(btns, &QDialogButtonBox::rejected, &dialog, + &QDialog::reject); l->addWidget(w); l->addStretch(); l->addWidget(btns); @@ -1153,7 +1166,8 @@ void CMakeSetupDialog::showUserChanges() l->addWidget(textedit); QDialogButtonBox* btns = new QDialogButtonBox(QDialogButtonBox::Close, Qt::Horizontal, &dialog); - QObject::connect(btns, SIGNAL(rejected()), &dialog, SLOT(accept())); + QObject::connect(btns, &QDialogButtonBox::rejected, &dialog, + &QDialog::accept); l->addWidget(btns); QString command; @@ -1207,15 +1221,23 @@ void CMakeSetupDialog::doOutputContextMenu(QPoint pt) std::unique_ptr<QMenu> menu(this->Output->createStandardContextMenu()); menu->addSeparator(); - menu->addAction(tr("Find..."), this, SLOT(doOutputFindDialog()), - QKeySequence::Find); - menu->addAction(tr("Find Next"), this, SLOT(doOutputFindNext()), - QKeySequence::FindNext); - menu->addAction(tr("Find Previous"), this, SLOT(doOutputFindPrev()), - QKeySequence::FindPrevious); + auto* a = menu->addAction(tr("Find...")); + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::doOutputFindDialog); + a->setShortcut(QKeySequence::Find); + a = menu->addAction(tr("Find Next")); + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::doOutputFindNext); + a->setShortcut(QKeySequence::FindNext); + a = menu->addAction(tr("Find Previous")); + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::doOutputFindPrev); + a->setShortcut(QKeySequence::FindPrevious); menu->addSeparator(); - menu->addAction(tr("Goto Next Error"), this, SLOT(doOutputErrorNext()), - QKeySequence(Qt::Key_F8)); + a = menu->addAction(tr("Goto Next Error")); + QObject::connect(a, &QAction::triggered, this, + &CMakeSetupDialog::doOutputErrorNext); + a->setShortcut(QKeySequence(Qt::Key_F8)); menu->exec(this->Output->mapToGlobal(pt)); } diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx index 3c24b9b..918f137 100644 --- a/Source/QtDialog/FirstConfigure.cxx +++ b/Source/QtDialog/FirstConfigure.cxx @@ -47,17 +47,18 @@ StartCompilerSetup::StartCompilerSetup(QString defaultGeneratorPlatform, this->CompilerSetupOptions[0]->setChecked(true); - QObject::connect(this->CompilerSetupOptions[0], SIGNAL(toggled(bool)), this, - SLOT(onSelectionChanged(bool))); - QObject::connect(this->CompilerSetupOptions[1], SIGNAL(toggled(bool)), this, - SLOT(onSelectionChanged(bool))); - QObject::connect(this->CompilerSetupOptions[2], SIGNAL(toggled(bool)), this, - SLOT(onSelectionChanged(bool))); - QObject::connect(this->CompilerSetupOptions[3], SIGNAL(toggled(bool)), this, - SLOT(onSelectionChanged(bool))); - QObject::connect(this->GeneratorOptions, - SIGNAL(currentIndexChanged(QString const&)), this, - SLOT(onGeneratorChanged(QString const&))); + QObject::connect(this->CompilerSetupOptions[0], &QRadioButton::toggled, this, + &StartCompilerSetup::onSelectionChanged); + QObject::connect(this->CompilerSetupOptions[1], &QRadioButton::toggled, this, + &StartCompilerSetup::onSelectionChanged); + QObject::connect(this->CompilerSetupOptions[2], &QRadioButton::toggled, this, + &StartCompilerSetup::onSelectionChanged); + QObject::connect(this->CompilerSetupOptions[3], &QRadioButton::toggled, this, + &StartCompilerSetup::onSelectionChanged); + QObject::connect( + this->GeneratorOptions, + static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), + this, &StartCompilerSetup::onGeneratorChanged); } QFrame* StartCompilerSetup::CreateToolsetWidgets() @@ -186,8 +187,10 @@ void StartCompilerSetup::onSelectionChanged(bool on) } } -void StartCompilerSetup::onGeneratorChanged(QString const& name) +void StartCompilerSetup::onGeneratorChanged(int index) { + QString name = this->GeneratorOptions->itemText(index); + // Display the generator platform for the generators supporting it if (GeneratorsSupportingPlatform.contains(name)) { @@ -458,9 +461,9 @@ FirstConfigure::FirstConfigure() this->mStartCompilerSetupPage = new StartCompilerSetup( env_generator_platform, env_generator_toolset, this); this->setPage(Start, this->mStartCompilerSetupPage); - QObject::connect(this->mStartCompilerSetupPage, SIGNAL(selectionChanged()), - this, SLOT(restart())); - + QObject::connect(this->mStartCompilerSetupPage, + &StartCompilerSetup::selectionChanged, this, + &FirstConfigure::restart); this->mNativeCompilerSetupPage = new NativeCompilerSetup(this); this->setPage(NativeSetup, this->mNativeCompilerSetupPage); diff --git a/Source/QtDialog/FirstConfigure.h b/Source/QtDialog/FirstConfigure.h index 4c757da..ca5f52e 100644 --- a/Source/QtDialog/FirstConfigure.h +++ b/Source/QtDialog/FirstConfigure.h @@ -49,7 +49,7 @@ signals: protected slots: void onSelectionChanged(bool); - void onGeneratorChanged(QString const& name); + void onGeneratorChanged(int index); protected: QComboBox* GeneratorOptions; diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 3bf4409..4f4b218 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -576,15 +576,15 @@ QWidget* QCMakeCacheModelDelegate::createEditor( if (type == QCMakeProperty::PATH) { QCMakePathEditor* editor = new QCMakePathEditor(p, var.data(Qt::DisplayRole).toString()); - QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, - SLOT(setFileDialogFlag(bool))); + QObject::connect(editor, &QCMakePathEditor::fileDialogExists, this, + &QCMakeCacheModelDelegate::setFileDialogFlag); return editor; } if (type == QCMakeProperty::FILEPATH) { QCMakeFilePathEditor* editor = new QCMakeFilePathEditor(p, var.data(Qt::DisplayRole).toString()); - QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, - SLOT(setFileDialogFlag(bool))); + QObject::connect(editor, &QCMakePathEditor::fileDialogExists, this, + &QCMakeCacheModelDelegate::setFileDialogFlag); return editor; } if (type == QCMakeProperty::STRING && diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx index d16ea58..1fc839f 100644 --- a/Source/QtDialog/QCMakeWidgets.cxx +++ b/Source/QtDialog/QCMakeWidgets.cxx @@ -17,8 +17,8 @@ QCMakeFileEditor::QCMakeFileEditor(QWidget* p, QString var) this->ToolButton = new QToolButton(this); this->ToolButton->setText("..."); this->ToolButton->setCursor(QCursor(Qt::ArrowCursor)); - QObject::connect(this->ToolButton, SIGNAL(clicked(bool)), this, - SLOT(chooseFile())); + QObject::connect(this->ToolButton, &QToolButton::clicked, this, + &QCMakeFileEditor::chooseFile); } QCMakeFilePathEditor::QCMakeFilePathEditor(QWidget* p, const QString& var) diff --git a/Source/QtDialog/WarningMessagesDialog.cxx b/Source/QtDialog/WarningMessagesDialog.cxx index f608a84..1fcf2b1 100644 --- a/Source/QtDialog/WarningMessagesDialog.cxx +++ b/Source/QtDialog/WarningMessagesDialog.cxx @@ -26,18 +26,22 @@ void WarningMessagesDialog::setInitialValues() void WarningMessagesDialog::setupSignals() { - QObject::connect(this->buttonBox, SIGNAL(accepted()), this, - SLOT(doAccept())); + QObject::connect(this->buttonBox, &QDialogButtonBox::accepted, this, + &WarningMessagesDialog::doAccept); - QObject::connect(this->suppressDeveloperWarnings, SIGNAL(stateChanged(int)), - this, SLOT(doSuppressDeveloperWarningsChanged(int))); - QObject::connect(this->suppressDeprecatedWarnings, SIGNAL(stateChanged(int)), - this, SLOT(doSuppressDeprecatedWarningsChanged(int))); + QObject::connect(this->suppressDeveloperWarnings, &QCheckBox::stateChanged, + this, + &WarningMessagesDialog::doSuppressDeveloperWarningsChanged); + QObject::connect( + this->suppressDeprecatedWarnings, &QCheckBox::stateChanged, this, + &WarningMessagesDialog::doSuppressDeprecatedWarningsChanged); - QObject::connect(this->developerWarningsAsErrors, SIGNAL(stateChanged(int)), - this, SLOT(doDeveloperWarningsAsErrorsChanged(int))); - QObject::connect(this->deprecatedWarningsAsErrors, SIGNAL(stateChanged(int)), - this, SLOT(doDeprecatedWarningsAsErrorsChanged(int))); + QObject::connect(this->developerWarningsAsErrors, &QCheckBox::stateChanged, + this, + &WarningMessagesDialog::doDeveloperWarningsAsErrorsChanged); + QObject::connect( + this->deprecatedWarningsAsErrors, &QCheckBox::stateChanged, this, + &WarningMessagesDialog::doDeprecatedWarningsAsErrorsChanged); } void WarningMessagesDialog::doAccept() diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index fbf4ceb..1e625a4 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -5,7 +5,8 @@ // POSIX APIs are needed # define _POSIX_C_SOURCE 200809L #endif -#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || \ + defined(__QNX__) // For isascii # define _XOPEN_SOURCE 700 #endif diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx index bd6bb3d..67f7e11 100644 --- a/Source/cmTimestamp.cxx +++ b/Source/cmTimestamp.cxx @@ -5,7 +5,8 @@ // POSIX APIs are needed # define _POSIX_C_SOURCE 200809L #endif -#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || \ + defined(__QNX__) // For isascii # define _XOPEN_SOURCE 700 #endif diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 34fc26e..62163ac 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -108,11 +108,6 @@ XcodeRemoveExcessiveISystem() # Isolate device tests from host architecture selection. unset(ENV{CMAKE_OSX_ARCHITECTURES}) -if(XCODE_VERSION VERSION_GREATER_EQUAL 12) - # FIXME: Restore device tests and fix them for the Xcode "new build system" - return() -endif() - # Use a single build tree for a few tests without cleaning. if(NOT XCODE_VERSION VERSION_LESS 5) @@ -142,8 +137,8 @@ if(NOT XCODE_VERSION VERSION_LESS 5) file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") run_cmake(XcodeBundles) - run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .) - run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install) + run_cmake_command(XcodeBundles-build-macOS ${CMAKE_COMMAND} --build .) + run_cmake_command(XcodeBundles-install-macOS ${CMAKE_COMMAND} --build . --target install) unset(RunCMake_TEST_BINARY_DIR) unset(RunCMake_TEST_NO_CLEAN) @@ -159,8 +154,8 @@ if(NOT XCODE_VERSION VERSION_LESS 5) file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") run_cmake(XcodeBundles) - run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .) - run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install) + run_cmake_command(XcodeBundles-build-iOS ${CMAKE_COMMAND} --build .) + run_cmake_command(XcodeBundles-install-iOS ${CMAKE_COMMAND} --build . --target install) unset(RunCMake_TEST_BINARY_DIR) unset(RunCMake_TEST_NO_CLEAN) @@ -178,8 +173,8 @@ if(NOT XCODE_VERSION VERSION_LESS 7) file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") run_cmake(XcodeBundles) - run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .) - run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install) + run_cmake_command(XcodeBundles-build-watchOS ${CMAKE_COMMAND} --build .) + run_cmake_command(XcodeBundles-install-watchOS ${CMAKE_COMMAND} --build . --target install) unset(RunCMake_TEST_BINARY_DIR) unset(RunCMake_TEST_NO_CLEAN) @@ -197,8 +192,8 @@ if(NOT XCODE_VERSION VERSION_LESS 7.1) file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") run_cmake(XcodeBundles) - run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .) - run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install) + run_cmake_command(XcodeBundles-build-tvOS ${CMAKE_COMMAND} --build .) + run_cmake_command(XcodeBundles-install-tvOS ${CMAKE_COMMAND} --build . --target install) unset(RunCMake_TEST_BINARY_DIR) unset(RunCMake_TEST_NO_CLEAN) @@ -211,7 +206,7 @@ if(NOT XCODE_VERSION VERSION_LESS 7) unset(RunCMake_TEST_OPTIONS) endif() -if(NOT XCODE_VERSION VERSION_LESS 6) +if(XCODE_VERSION VERSION_GREATER_EQUAL 6 AND XCODE_VERSION VERSION_LESS 12) # XcodeIOSInstallCombined set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombined-build) set(RunCMake_TEST_NO_CLEAN 1) diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt index 7625cf6..92d2411 100644 --- a/Utilities/cmlibuv/CMakeLists.txt +++ b/Utilities/cmlibuv/CMakeLists.txt @@ -336,6 +336,24 @@ if(CMAKE_SYSTEM_NAME STREQUAL "HP-UX") ) endif() +if(CMAKE_SYSTEM_NAME STREQUAL "QNX") + list(APPEND uv_headers + include/uv/posix.h + ) + list(APPEND uv_defines + _XOPEN_SOURCE=700 + ) + list(APPEND uv_sources + src/unix/posix-hrtime.c + src/unix/posix-poll.c + src/unix/no-fsevents.c + src/unix/no-proctitle.c + ) + list(APPEND uv_libraries + socket + ) +endif() + include_directories( ${uv_includes} ${KWSYS_HEADER_ROOT} @@ -1675,6 +1675,10 @@ else uv_c_flags="${uv_c_flags} -D__EXTENSIONS__ -D_XOPEN_SOURCE=600" libs="${libs} -lkstat -lnsl -lsendfile -lsocket -lrt" ;; + *QNX*) + uv_c_flags="${uv_c_flags} -D_XOPEN_SOURCE=700" + libs="${libs} -lsocket" + ;; esac fi if test "x${bootstrap_system_libuv}" = "x"; then |