summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab/ci/docker/cuda10.2/Dockerfile2
-rw-r--r--.gitlab/ci/docker/cuda11.6/Dockerfile2
-rw-r--r--.gitlab/ci/docker/cuda11.8-minimal/Dockerfile2
-rw-r--r--.gitlab/ci/docker/cuda9.2/Dockerfile2
-rw-r--r--.gitlab/ci/docker/nvhpc22.11/Dockerfile2
-rw-r--r--Help/release/dev/cygwin-no-legacy-win32.rst5
-rw-r--r--Modules/CMakeSwiftInformation.cmake6
-rw-r--r--Modules/Platform/CYGWIN.cmake45
-rw-r--r--Modules/SystemInformation.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cpack.cxx3
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx4
-rw-r--r--Source/cmGlobalGenerator.cxx29
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx10
-rw-r--r--Source/cmStateSnapshot.cxx8
-rw-r--r--Source/cmake.cxx3
-rw-r--r--Source/kwsys/CONTRIBUTING.rst2
-rw-r--r--Source/kwsys/CommandLineArguments.cxx2
-rw-r--r--Source/kwsys/Glob.cxx4
-rw-r--r--Source/kwsys/ProcessWin32.c5
-rw-r--r--Source/kwsys/RegularExpression.cxx4
-rw-r--r--Source/kwsys/RegularExpression.hxx.in8
-rw-r--r--Source/kwsys/kwsysPrivate.h2
-rw-r--r--Source/kwsys/testConfigure.cxx2
-rw-r--r--Source/kwsys/testConsoleBuf.cxx2
-rw-r--r--Source/kwsys/testDirectory.cxx11
-rw-r--r--Source/kwsys/testEncoding.cxx2
-rw-r--r--Source/kwsys/testFStream.cxx2
-rw-r--r--Source/kwsys/testStatus.cxx2
-rw-r--r--Source/kwsys/testSystemInformation.cxx2
-rw-r--r--Source/kwsys/testSystemTools.cxx2
-rw-r--r--Tests/RunCMake/CMakePresets/NoDebug-stdout.txt4
-rw-r--r--Tests/RunCMake/Configure/CopyFileABI-stdout.txt4
-rw-r--r--Tests/RunCMake/Configure/ErrorLogs-result.txt1
-rw-r--r--Tests/RunCMake/Configure/ErrorLogs-stderr.txt4
-rw-r--r--Tests/RunCMake/Configure/ErrorLogs-stdout.txt3
-rw-r--r--Tests/RunCMake/Configure/ErrorLogs.cmake5
-rw-r--r--Tests/RunCMake/Configure/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-config-ninja-stdout.txt4
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-noconfig-ninja-stdout.txt4
-rw-r--r--Tests/RunCMake/Swift/NoWorkToDo.cmake5
-rw-r--r--Tests/RunCMake/configure_file/RerunCMake-rerun-stdout.txt4
-rw-r--r--Tests/RunCMake/configure_file/RerunCMake-stdout.txt4
-rw-r--r--Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt4
-rw-r--r--Tests/RunCMake/try_compile/RerunCMake-rerun-stdout.txt4
-rw-r--r--Tests/RunCMake/try_compile/RerunCMake-stdout.txt4
-rw-r--r--Tests/SwiftOnly/CMakeLists.txt11
-rw-r--r--Tests/SwiftOnly/SwiftPlugin/CMakeLists.txt5
-rw-r--r--Tests/SwiftOnly/SwiftPlugin/main.swift4
-rw-r--r--Tests/SwiftOnly/SwiftPlugin/plugin.swift3
50 files changed, 107 insertions, 150 deletions
diff --git a/.gitlab/ci/docker/cuda10.2/Dockerfile b/.gitlab/ci/docker/cuda10.2/Dockerfile
index b6f37b5..cd30446 100644
--- a/.gitlab/ci/docker/cuda10.2/Dockerfile
+++ b/.gitlab/ci/docker/cuda10.2/Dockerfile
@@ -1,4 +1,4 @@
-FROM nvidia/cuda:10.2-devel-ubuntu18.04
+FROM kitware/nvidia-cuda:10.2-devel-ubuntu18.04
MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
COPY llvm.list /etc/apt/sources.list.d/llvm.list
diff --git a/.gitlab/ci/docker/cuda11.6/Dockerfile b/.gitlab/ci/docker/cuda11.6/Dockerfile
index 27cdf8b..f69b0fd 100644
--- a/.gitlab/ci/docker/cuda11.6/Dockerfile
+++ b/.gitlab/ci/docker/cuda11.6/Dockerfile
@@ -1,4 +1,4 @@
-FROM nvidia/cuda:11.6.0-devel-ubuntu20.04
+FROM kitware/nvidia-cuda:11.6.0-devel-ubuntu20.04
MAINTAINER Ben Boeckel <ben.boeckel@kitware.com>
COPY llvm.list /etc/apt/sources.list.d/llvm.list
diff --git a/.gitlab/ci/docker/cuda11.8-minimal/Dockerfile b/.gitlab/ci/docker/cuda11.8-minimal/Dockerfile
index 02e096e..e185848 100644
--- a/.gitlab/ci/docker/cuda11.8-minimal/Dockerfile
+++ b/.gitlab/ci/docker/cuda11.8-minimal/Dockerfile
@@ -1,4 +1,4 @@
-FROM nvidia/cuda:11.8.0-devel-ubuntu20.04
+FROM kitware/nvidia-cuda:11.8.0-devel-ubuntu20.04
MAINTAINER Robert Maynard <rmaynard@nvidia.com>
COPY install_deps.sh /root/install_deps.sh
diff --git a/.gitlab/ci/docker/cuda9.2/Dockerfile b/.gitlab/ci/docker/cuda9.2/Dockerfile
index 7eae886..d7e483b 100644
--- a/.gitlab/ci/docker/cuda9.2/Dockerfile
+++ b/.gitlab/ci/docker/cuda9.2/Dockerfile
@@ -1,4 +1,4 @@
-FROM nvidia/cuda:9.2-devel-ubuntu16.04
+FROM kitware/nvidia-cuda:9.2-devel-ubuntu16.04
MAINTAINER Brad King <brad.king@kitware.com>
COPY install_deps.sh /root/install_deps.sh
diff --git a/.gitlab/ci/docker/nvhpc22.11/Dockerfile b/.gitlab/ci/docker/nvhpc22.11/Dockerfile
index 52f4f8e..078ae37 100644
--- a/.gitlab/ci/docker/nvhpc22.11/Dockerfile
+++ b/.gitlab/ci/docker/nvhpc22.11/Dockerfile
@@ -1,5 +1,5 @@
# https://catalog.ngc.nvidia.com/orgs/nvidia/containers/nvhpc/tags
-FROM nvcr.io/nvidia/nvhpc:22.11-devel-cuda_multi-ubuntu22.04
+FROM kitware/nvidia-nvhpc:22.11-devel-cuda_multi-ubuntu22.04
MAINTAINER Brad King <brad.king@kitware.com>
COPY install_deps.sh /root/install_deps.sh
diff --git a/Help/release/dev/cygwin-no-legacy-win32.rst b/Help/release/dev/cygwin-no-legacy-win32.rst
new file mode 100644
index 0000000..7991138
--- /dev/null
+++ b/Help/release/dev/cygwin-no-legacy-win32.rst
@@ -0,0 +1,5 @@
+cygwin-no-legacy-win32
+----------------------
+
+* On CYGWIN, the undocumented ``CMAKE_LEGACY_CYGWIN_WIN32`` mode for
+ compatibility with CMake versions older than 2.8.4 has been removed.
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake
index 64c7519..a75dfce 100644
--- a/Modules/CMakeSwiftInformation.cmake
+++ b/Modules/CMakeSwiftInformation.cmake
@@ -17,8 +17,6 @@ if(CMAKE_Swift_COMPILER_ID)
include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_Swift_COMPILER_ID}-Swift OPTIONAL)
endif()
-set(CMAKE_EXE_EXPORTS_Swift_FLAG "-emit-module -emit-module-path <SWIFT_MODULE> ${CMAKE_Swift_IMPLIB_LINKER_FLAGS}")
-
set(CMAKE_INCLUDE_FLAG_Swift "-I ")
# FIXME: Move compiler- and platform-specific flags to the above-included modules.
@@ -117,6 +115,10 @@ if(NOT CMAKE_Swift_LINK_EXECUTABLE)
set(CMAKE_Swift_LINK_EXECUTABLE "<CMAKE_Swift_COMPILER> -j ${CMAKE_Swift_NUM_THREADS} -num-threads ${CMAKE_Swift_NUM_THREADS} -emit-executable -o <TARGET> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> <LINK_LIBRARIES>")
endif()
+if(NOT CMAKE_Swift_LINK_EXECUTABLE_WITH_EXPORTS)
+ set(CMAKE_Swift_LINK_EXECUTABLE_WITH_EXPORTS "${CMAKE_Swift_LINK_EXECUTABLE} -emit-module -emit-module-path <SWIFT_MODULE> ${CMAKE_Swift_IMPLIB_LINKER_FLAGS}")
+endif()
+
if(NOT CMAKE_Swift_CREATE_STATIC_LIBRARY)
set(CMAKE_Swift_CREATE_STATIC_LIBRARY "<CMAKE_Swift_COMPILER> -j ${CMAKE_Swift_NUM_THREADS} -num-threads ${CMAKE_Swift_NUM_THREADS} -emit-library -static -o <TARGET> -module-name <SWIFT_MODULE_NAME> -module-link-name <SWIFT_LIBRARY_NAME> -emit-module -emit-module-path <SWIFT_MODULE> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> <LINK_LIBRARIES>")
diff --git a/Modules/Platform/CYGWIN.cmake b/Modules/Platform/CYGWIN.cmake
index fc4ea2e..0b64496 100644
--- a/Modules/Platform/CYGWIN.cmake
+++ b/Modules/Platform/CYGWIN.cmake
@@ -1,48 +1,3 @@
-if("${CMAKE_MINIMUM_REQUIRED_VERSION}" VERSION_LESS "2.8.3.20101214" AND NOT MSYS)
- set(__USE_CMAKE_LEGACY_CYGWIN_WIN32 1)
-endif()
-if(NOT DEFINED WIN32 AND NOT MSYS)
- set(WIN32 0)
- if(DEFINED __USE_CMAKE_LEGACY_CYGWIN_WIN32)
- if(NOT DEFINED CMAKE_LEGACY_CYGWIN_WIN32
- AND DEFINED ENV{CMAKE_LEGACY_CYGWIN_WIN32})
- set(CMAKE_LEGACY_CYGWIN_WIN32 $ENV{CMAKE_LEGACY_CYGWIN_WIN32})
- endif()
- if(CMAKE_LEGACY_CYGWIN_WIN32)
- message(STATUS "Defining WIN32 under Cygwin due to CMAKE_LEGACY_CYGWIN_WIN32")
- set(WIN32 1)
- elseif("x${CMAKE_LEGACY_CYGWIN_WIN32}" STREQUAL "x")
- message(WARNING "CMake no longer defines WIN32 on Cygwin!"
- "\n"
- "(1) If you are just trying to build this project, ignore this warning "
- "or quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or "
- "in the CMake cache. "
- "If later configuration or build errors occur then this project may "
- "have been written under the assumption that Cygwin is WIN32. "
- "In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead."
- "\n"
- "(2) If you are developing this project, add the line\n"
- " set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required\n"
- "at the top of your top-level CMakeLists.txt file or set the minimum "
- "required version of CMake to 2.8.4 or higher. "
- "Then teach your project to build on Cygwin without WIN32.")
- endif()
- elseif(DEFINED CMAKE_LEGACY_CYGWIN_WIN32)
- message(AUTHOR_WARNING "CMAKE_LEGACY_CYGWIN_WIN32 ignored because\n"
- " cmake_minimum_required(VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION})\n"
- "is at least 2.8.4.")
- endif()
-endif()
-if(DEFINED __USE_CMAKE_LEGACY_CYGWIN_WIN32)
- # Pass WIN32 legacy setting to scripts.
- if(WIN32)
- set(ENV{CMAKE_LEGACY_CYGWIN_WIN32} 1)
- else()
- set(ENV{CMAKE_LEGACY_CYGWIN_WIN32} 0)
- endif()
- unset(__USE_CMAKE_LEGACY_CYGWIN_WIN32)
-endif()
-
set(CYGWIN 1)
set(CMAKE_SHARED_LIBRARY_PREFIX "cyg")
diff --git a/Modules/SystemInformation.cmake b/Modules/SystemInformation.cmake
index fbc32a8..97f3856 100644
--- a/Modules/SystemInformation.cmake
+++ b/Modules/SystemInformation.cmake
@@ -83,8 +83,6 @@ macro(DUMP_FILE THE_FILE)
endmacro()
DUMP_FILE("../CMakeCache.txt")
-DUMP_FILE("../CMakeFiles/CMakeOutput.log")
-DUMP_FILE("../CMakeFiles/CMakeError.log")
DUMP_FILE("../CMakeFiles/CMakeSystem.cmake")
foreach (EXTRA_FILE ${EXTRA_DUMP_FILES})
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 464b1e7..d7b5ea2 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 25)
-set(CMake_VERSION_PATCH 20230119)
+set(CMake_VERSION_PATCH 20230123)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index c228f07..2257118 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -233,9 +233,6 @@ int main(int argc, char const* const* argv)
cminst.GetCurrentSnapshot().SetDefaultDefinitions();
cmGlobalGenerator cmgg(&cminst);
cmMakefile globalMF(&cmgg, cminst.GetCurrentSnapshot());
-#if defined(__CYGWIN__)
- globalMF.AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
-#endif
bool parsed = true;
for (std::size_t i = 0; i < inputArgs.size(); i++) {
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 5a66f82..ee06b29 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -326,10 +326,6 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
this->Makefile->AddDefinition("CTEST_SCRIPT_ARG", script_arg);
}
-#if defined(__CYGWIN__)
- this->Makefile->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
-#endif
-
// set a callback function to update the elapsed time
this->Makefile->OnExecuteCommand([this] { this->UpdateElapsedTime(); });
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index fa5433f..4cfec22 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -4,11 +4,13 @@
#include <algorithm>
#include <cassert>
+#include <chrono>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <initializer_list>
+#include <iomanip>
#include <iterator>
#include <sstream>
#include <utility>
@@ -1303,6 +1305,8 @@ void cmGlobalGenerator::CreateLocalGenerators()
void cmGlobalGenerator::Configure()
{
+ auto startTime = std::chrono::steady_clock::now();
+
this->FirstTimeProgress = 0.0f;
this->ClearGeneratorMembers();
this->NextDeferId = 0;
@@ -1350,20 +1354,17 @@ void cmGlobalGenerator::Configure()
"number of local generators",
cmStateEnums::INTERNAL);
+ auto endTime = std::chrono::steady_clock::now();
+
if (this->CMakeInstance->GetWorkingMode() == cmake::NORMAL_MODE) {
std::ostringstream msg;
if (cmSystemTools::GetErrorOccurredFlag()) {
msg << "Configuring incomplete, errors occurred!";
- const char* logs[] = { "CMakeOutput.log", "CMakeError.log", nullptr };
- for (const char** log = logs; *log; ++log) {
- std::string f = cmStrCat(this->CMakeInstance->GetHomeOutputDirectory(),
- "/CMakeFiles/", *log);
- if (cmSystemTools::FileExists(f)) {
- msg << "\nSee also \"" << f << "\".";
- }
- }
} else {
- msg << "Configuring done";
+ auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(
+ endTime - startTime);
+ msg << "Configuring done (" << std::fixed << std::setprecision(1)
+ << ms.count() / 1000.0L << "s)";
}
this->CMakeInstance->UpdateProgress(msg.str(), -1);
}
@@ -1606,6 +1607,8 @@ bool cmGlobalGenerator::Compute()
void cmGlobalGenerator::Generate()
{
+ auto startTime = std::chrono::steady_clock::now();
+
// Create a map from local generator to the complete set of targets
// it builds by default.
this->InitializeProgressMarks();
@@ -1688,7 +1691,13 @@ void cmGlobalGenerator::Generate()
w.str());
}
- this->CMakeInstance->UpdateProgress("Generating done", -1);
+ auto endTime = std::chrono::steady_clock::now();
+ auto ms =
+ std::chrono::duration_cast<std::chrono::milliseconds>(endTime - startTime);
+ std::ostringstream msg;
+ msg << "Generating done (" << std::fixed << std::setprecision(1)
+ << ms.count() / 1000.0L << "s)";
+ this->CMakeInstance->UpdateProgress(msg.str(), -1);
}
bool cmGlobalGenerator::ComputeTargetDepends()
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index b8f851f..d481b64 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -644,14 +644,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd(
} break;
case cmStateEnums::SHARED_LIBRARY:
case cmStateEnums::MODULE_LIBRARY:
- break;
case cmStateEnums::EXECUTABLE:
- if (this->TargetLinkLanguage(config) == "Swift") {
- if (this->GeneratorTarget->IsExecutableWithExports()) {
- this->Makefile->GetDefExpandList("CMAKE_EXE_EXPORTS_Swift_FLAG",
- linkCmds);
- }
- }
break;
default:
assert(false && "Unexpected target type");
@@ -1112,7 +1105,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
this->GetObjectFilePath(source, config));
}
}
- if (targetType != cmStateEnums::EXECUTABLE) {
+ if (targetType != cmStateEnums::EXECUTABLE ||
+ gt->IsExecutableWithExports()) {
linkBuild.Outputs.push_back(vars["SWIFT_MODULE"]);
}
} else {
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index cb5f11f..e230702 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -301,14 +301,6 @@ void cmStateSnapshot::SetDefaultDefinitions()
this->SetDefinition("UNIX", "1");
this->SetDefinition("CMAKE_HOST_UNIX", "1");
}
-#if defined(__CYGWIN__)
- std::string legacy;
- if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) &&
- cmIsOn(legacy)) {
- this->SetDefinition("WIN32", "1");
- this->SetDefinition("CMAKE_HOST_WIN32", "1");
- }
-#endif
#if defined(__APPLE__)
this->SetDefinition("APPLE", "1");
this->SetDefinition("CMAKE_HOST_APPLE", "1");
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 0d947a5..468ff73 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2416,9 +2416,6 @@ int cmake::ActualConfigure()
// info to save time
if (!this->GetIsInTryCompile()) {
this->GlobalGenerator->ClearEnabledLanguages();
-
- this->TruncateOutputLog("CMakeOutput.log");
- this->TruncateOutputLog("CMakeError.log");
}
#if !defined(CMAKE_BOOTSTRAP)
diff --git a/Source/kwsys/CONTRIBUTING.rst b/Source/kwsys/CONTRIBUTING.rst
index 32e7b83..ebd3ed3 100644
--- a/Source/kwsys/CONTRIBUTING.rst
+++ b/Source/kwsys/CONTRIBUTING.rst
@@ -27,7 +27,7 @@ copies of KWSys within dependent projects can be updated to get the changes.
Code Style
==========
-We use `clang-format`_ version **6.0** to define our style for C++ code in
+We use `clang-format`_ version **15** to define our style for C++ code in
the KWSys source tree. See the `.clang-format`_ configuration file for
our style settings. Use the `clang-format.bash`_ script to format source
code. It automatically runs ``clang-format`` on the set of source files
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx
index e45db36..ccd5f6d 100644
--- a/Source/kwsys/CommandLineArguments.cxx
+++ b/Source/kwsys/CommandLineArguments.cxx
@@ -319,7 +319,7 @@ void CommandLineArguments::DeleteRemainingArguments(int argc, char*** argv)
{
int cc;
for (cc = 0; cc < argc; ++cc) {
- delete[](*argv)[cc];
+ delete[] (*argv)[cc];
}
delete[] * argv;
}
diff --git a/Source/kwsys/Glob.cxx b/Source/kwsys/Glob.cxx
index fa2c295..92eae41 100644
--- a/Source/kwsys/Glob.cxx
+++ b/Source/kwsys/Glob.cxx
@@ -390,8 +390,8 @@ bool Glob::FindFiles(const std::string& inexpr, GlobMessages* messages)
#endif
// Handle drive letters on Windows
if (expr[1] == ':' && expr[0] != '/') {
- skip = 2;
- }
+ skip = 2;
+ }
}
if (skip > 0) {
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index 17e1507..0b43b4a 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -2406,8 +2406,9 @@ static int kwsysProcess_List__Next_NT4(kwsysProcess_List* self)
{
if (self->CurrentInfo) {
if (self->CurrentInfo->NextEntryDelta > 0) {
- self->CurrentInfo = ((PSYSTEM_PROCESS_INFORMATION)(
- (char*)self->CurrentInfo + self->CurrentInfo->NextEntryDelta));
+ self->CurrentInfo =
+ ((PSYSTEM_PROCESS_INFORMATION)((char*)self->CurrentInfo +
+ self->CurrentInfo->NextEntryDelta));
return 1;
}
self->CurrentInfo = 0;
diff --git a/Source/kwsys/RegularExpression.cxx b/Source/kwsys/RegularExpression.cxx
index fb4e380..c96a96d 100644
--- a/Source/kwsys/RegularExpression.cxx
+++ b/Source/kwsys/RegularExpression.cxx
@@ -366,9 +366,9 @@ bool RegularExpression::compile(const char* exp)
}
// Allocate space.
- //#ifndef _WIN32
+ // #ifndef _WIN32
delete[] this->program;
- //#endif
+ // #endif
this->program = new char[comp.regsize];
this->progsize = static_cast<int>(comp.regsize);
diff --git a/Source/kwsys/RegularExpression.hxx.in b/Source/kwsys/RegularExpression.hxx.in
index 2709cde..2cb7f5e 100644
--- a/Source/kwsys/RegularExpression.hxx.in
+++ b/Source/kwsys/RegularExpression.hxx.in
@@ -456,9 +456,9 @@ inline RegularExpression::RegularExpression(const std::string& s)
*/
inline RegularExpression::~RegularExpression()
{
- //#ifndef _WIN32
+ // #ifndef _WIN32
delete[] this->program;
- //#endif
+ // #endif
}
/**
@@ -556,9 +556,9 @@ inline bool RegularExpression::is_valid() const
inline void RegularExpression::set_invalid()
{
- //#ifndef _WIN32
+ // #ifndef _WIN32
delete[] this->program;
- //#endif
+ // #endif
this->program = nullptr;
}
diff --git a/Source/kwsys/kwsysPrivate.h b/Source/kwsys/kwsysPrivate.h
index dd9c127..2f5c2fa 100644
--- a/Source/kwsys/kwsysPrivate.h
+++ b/Source/kwsys/kwsysPrivate.h
@@ -27,7 +27,7 @@
*/
# define KWSYS_NAMESPACE_STRING KWSYS_NAMESPACE_STRING0(KWSYS_NAMESPACE)
# define KWSYS_NAMESPACE_STRING0(x) KWSYS_NAMESPACE_STRING1(x)
-# define KWSYS_NAMESPACE_STRING1(x) # x
+# define KWSYS_NAMESPACE_STRING1(x) #x
#else
# error "kwsysPrivate.h included multiple times."
diff --git a/Source/kwsys/testConfigure.cxx b/Source/kwsys/testConfigure.cxx
index a3c2ed3..4a34e1c 100644
--- a/Source/kwsys/testConfigure.cxx
+++ b/Source/kwsys/testConfigure.cxx
@@ -22,7 +22,7 @@ static bool testFallthrough(int n)
return r == 2;
}
-int testConfigure(int, char* [])
+int testConfigure(int, char*[])
{
bool res = true;
res = testFallthrough(1) && res;
diff --git a/Source/kwsys/testConsoleBuf.cxx b/Source/kwsys/testConsoleBuf.cxx
index 4b7ddf0..f9b826d 100644
--- a/Source/kwsys/testConsoleBuf.cxx
+++ b/Source/kwsys/testConsoleBuf.cxx
@@ -743,7 +743,7 @@ static int testConsole()
#endif
-int testConsoleBuf(int, char* [])
+int testConsoleBuf(int, char*[])
{
int ret = 0;
diff --git a/Source/kwsys/testDirectory.cxx b/Source/kwsys/testDirectory.cxx
index 79bdc98..8c73af2 100644
--- a/Source/kwsys/testDirectory.cxx
+++ b/Source/kwsys/testDirectory.cxx
@@ -19,7 +19,7 @@ file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
#include <testSystemTools.h>
-static int _doLongPathTest()
+static int doLongPathTest()
{
using namespace kwsys;
static const int LONG_PATH_THRESHOLD = 512;
@@ -77,7 +77,7 @@ static int _doLongPathTest()
return res;
}
-static int _nonExistentDirectoryTest()
+static int nonExistentDirectoryTest()
{
using namespace kwsys;
int res = 0;
@@ -105,7 +105,7 @@ static int _nonExistentDirectoryTest()
return res;
}
-static int _copyDirectoryTest()
+static int copyDirectoryTest()
{
using namespace kwsys;
const std::string source(TEST_SYSTEMTOOLS_BINARY_DIR
@@ -136,8 +136,7 @@ static int _copyDirectoryTest()
return 0;
}
-int testDirectory(int, char* [])
+int testDirectory(int, char*[])
{
- return _doLongPathTest() + _nonExistentDirectoryTest() +
- _copyDirectoryTest();
+ return doLongPathTest() + nonExistentDirectoryTest() + copyDirectoryTest();
}
diff --git a/Source/kwsys/testEncoding.cxx b/Source/kwsys/testEncoding.cxx
index 1d605cb..3acb6c8 100644
--- a/Source/kwsys/testEncoding.cxx
+++ b/Source/kwsys/testEncoding.cxx
@@ -266,7 +266,7 @@ static int testToWindowsExtendedPath()
#endif
}
-int testEncoding(int, char* [])
+int testEncoding(int, char*[])
{
const char* loc = setlocale(LC_ALL, "");
if (loc) {
diff --git a/Source/kwsys/testFStream.cxx b/Source/kwsys/testFStream.cxx
index 3325e20..9897a58 100644
--- a/Source/kwsys/testFStream.cxx
+++ b/Source/kwsys/testFStream.cxx
@@ -136,7 +136,7 @@ static int testBOMIO()
return 0;
}
-int testFStream(int, char* [])
+int testFStream(int, char*[])
{
int ret = 0;
diff --git a/Source/kwsys/testStatus.cxx b/Source/kwsys/testStatus.cxx
index 0a767a8..9cadada 100644
--- a/Source/kwsys/testStatus.cxx
+++ b/Source/kwsys/testStatus.cxx
@@ -16,7 +16,7 @@ file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
# include <windows.h>
#endif
-int testStatus(int, char* [])
+int testStatus(int, char*[])
{
bool res = true;
{
diff --git a/Source/kwsys/testSystemInformation.cxx b/Source/kwsys/testSystemInformation.cxx
index 4f0c522..7ae94ff 100644
--- a/Source/kwsys/testSystemInformation.cxx
+++ b/Source/kwsys/testSystemInformation.cxx
@@ -19,7 +19,7 @@
#define printMethod3(info, m, unit) \
std::cout << #m << ": " << info.m << " " << unit << "\n"
-int testSystemInformation(int, char* [])
+int testSystemInformation(int, char*[])
{
std::cout << "CTEST_FULL_OUTPUT\n"; // avoid truncation
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index 487da8d..8afcb68 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -1209,7 +1209,7 @@ static bool CheckSplitString()
return ret;
}
-int testSystemTools(int, char* [])
+int testSystemTools(int, char*[])
{
bool res = true;
diff --git a/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt b/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt
index c23ab89..f32056a 100644
--- a/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt
+++ b/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt
@@ -1,2 +1,2 @@
--- Configuring done
--- Generating done
+-- Configuring done \([0-9]+\.[0-9]s\)
+-- Generating done \([0-9]+\.[0-9]s\)
diff --git a/Tests/RunCMake/Configure/CopyFileABI-stdout.txt b/Tests/RunCMake/Configure/CopyFileABI-stdout.txt
index 6a856a4..2176554 100644
--- a/Tests/RunCMake/Configure/CopyFileABI-stdout.txt
+++ b/Tests/RunCMake/Configure/CopyFileABI-stdout.txt
@@ -1,4 +1,4 @@
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done.*
--- Configuring done
--- Generating done
+-- Configuring done \([0-9]+\.[0-9]s\)
+-- Generating done \([0-9]+\.[0-9]s\)
diff --git a/Tests/RunCMake/Configure/ErrorLogs-result.txt b/Tests/RunCMake/Configure/ErrorLogs-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/Configure/ErrorLogs-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/Configure/ErrorLogs-stderr.txt b/Tests/RunCMake/Configure/ErrorLogs-stderr.txt
deleted file mode 100644
index ec8c8c2..0000000
--- a/Tests/RunCMake/Configure/ErrorLogs-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-CMake Error at ErrorLogs.cmake:[0-9]+ \(message\):
- Some error!
-Call Stack \(most recent call first\):
- CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/Configure/ErrorLogs-stdout.txt b/Tests/RunCMake/Configure/ErrorLogs-stdout.txt
deleted file mode 100644
index c467b62..0000000
--- a/Tests/RunCMake/Configure/ErrorLogs-stdout.txt
+++ /dev/null
@@ -1,3 +0,0 @@
--- Configuring incomplete, errors occurred!
-See also ".*/Tests/RunCMake/Configure/ErrorLogs-build/CMakeFiles/CMakeOutput\.log"\.
-See also ".*/Tests/RunCMake/Configure/ErrorLogs-build/CMakeFiles/CMakeError\.log"\.
diff --git a/Tests/RunCMake/Configure/ErrorLogs.cmake b/Tests/RunCMake/Configure/ErrorLogs.cmake
deleted file mode 100644
index 3a9d107..0000000
--- a/Tests/RunCMake/Configure/ErrorLogs.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Some detailed output information!\n")
-file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Some detailed error information!\n")
-message(SEND_ERROR "Some error!")
diff --git a/Tests/RunCMake/Configure/RunCMakeTest.cmake b/Tests/RunCMake/Configure/RunCMakeTest.cmake
index 750fa3c..df6849e 100644
--- a/Tests/RunCMake/Configure/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Configure/RunCMakeTest.cmake
@@ -3,7 +3,6 @@ include(RunCMake)
run_cmake(ContinueAfterError)
run_cmake(CopyFileABI)
run_cmake(CustomTargetAfterError)
-run_cmake(ErrorLogs)
# Use a single build tree for a few tests without cleaning.
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RerunCMake-build)
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-config-ninja-stdout.txt b/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-config-ninja-stdout.txt
index 8877451..8c1c301 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-config-ninja-stdout.txt
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-config-ninja-stdout.txt
@@ -1,4 +1,4 @@
--- Configuring done
--- Generating done
+-- Configuring done \([0-9]+\.[0-9]s\)
+-- Generating done \([0-9]+\.[0-9]s\)
-- Build files have been written to: [^
]*/Tests/RunCMake/NinjaMultiConfig/Simple-build
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-noconfig-ninja-stdout.txt b/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-noconfig-ninja-stdout.txt
index 8877451..8c1c301 100644
--- a/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-noconfig-ninja-stdout.txt
+++ b/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-noconfig-ninja-stdout.txt
@@ -1,4 +1,4 @@
--- Configuring done
--- Generating done
+-- Configuring done \([0-9]+\.[0-9]s\)
+-- Generating done \([0-9]+\.[0-9]s\)
-- Build files have been written to: [^
]*/Tests/RunCMake/NinjaMultiConfig/Simple-build
diff --git a/Tests/RunCMake/Swift/NoWorkToDo.cmake b/Tests/RunCMake/Swift/NoWorkToDo.cmake
index e86a861..51c2ff3 100644
--- a/Tests/RunCMake/Swift/NoWorkToDo.cmake
+++ b/Tests/RunCMake/Swift/NoWorkToDo.cmake
@@ -1,2 +1,5 @@
enable_language(Swift)
-add_executable(hello hello.swift)
+add_executable(hello1 hello.swift)
+set_target_properties(hello1 PROPERTIES ENABLE_EXPORTS TRUE)
+
+add_executable(hello2 hello.swift)
diff --git a/Tests/RunCMake/configure_file/RerunCMake-rerun-stdout.txt b/Tests/RunCMake/configure_file/RerunCMake-rerun-stdout.txt
index 34c873c..9f4f24e 100644
--- a/Tests/RunCMake/configure_file/RerunCMake-rerun-stdout.txt
+++ b/Tests/RunCMake/configure_file/RerunCMake-rerun-stdout.txt
@@ -1,3 +1,3 @@
--- Configuring done
--- Generating done
+-- Configuring done \([0-9]+\.[0-9]s\)
+-- Generating done \([0-9]+\.[0-9]s\)
-- Build files have been written to: .*/Tests/RunCMake/configure_file/RerunCMake-build
diff --git a/Tests/RunCMake/configure_file/RerunCMake-stdout.txt b/Tests/RunCMake/configure_file/RerunCMake-stdout.txt
index 34c873c..9f4f24e 100644
--- a/Tests/RunCMake/configure_file/RerunCMake-stdout.txt
+++ b/Tests/RunCMake/configure_file/RerunCMake-stdout.txt
@@ -1,3 +1,3 @@
--- Configuring done
--- Generating done
+-- Configuring done \([0-9]+\.[0-9]s\)
+-- Generating done \([0-9]+\.[0-9]s\)
-- Build files have been written to: .*/Tests/RunCMake/configure_file/RerunCMake-build
diff --git a/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt b/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt
index b0438f5..a5ca781 100644
--- a/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt
+++ b/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt
@@ -1,5 +1,5 @@
Running CMake on RerunCMake
FALSE
--- Configuring done
--- Generating done
+-- Configuring done \([0-9]+\.[0-9]s\)
+-- Generating done \([0-9]+\.[0-9]s\)
-- Build files have been written to: .*/Tests/RunCMake/try_compile/RerunCMake-build
diff --git a/Tests/RunCMake/try_compile/RerunCMake-rerun-stdout.txt b/Tests/RunCMake/try_compile/RerunCMake-rerun-stdout.txt
index 9c78b26..e37d210 100644
--- a/Tests/RunCMake/try_compile/RerunCMake-rerun-stdout.txt
+++ b/Tests/RunCMake/try_compile/RerunCMake-rerun-stdout.txt
@@ -1,3 +1,3 @@
--- Configuring done
--- Generating done
+-- Configuring done \([0-9]+\.[0-9]s\)
+-- Generating done \([0-9]+\.[0-9]s\)
-- Build files have been written to: .*/Tests/RunCMake/try_compile/RerunCMake-build
diff --git a/Tests/RunCMake/try_compile/RerunCMake-stdout.txt b/Tests/RunCMake/try_compile/RerunCMake-stdout.txt
index 9c78b26..e37d210 100644
--- a/Tests/RunCMake/try_compile/RerunCMake-stdout.txt
+++ b/Tests/RunCMake/try_compile/RerunCMake-stdout.txt
@@ -1,3 +1,3 @@
--- Configuring done
--- Generating done
+-- Configuring done \([0-9]+\.[0-9]s\)
+-- Generating done \([0-9]+\.[0-9]s\)
-- Build files have been written to: .*/Tests/RunCMake/try_compile/RerunCMake-build
diff --git a/Tests/SwiftOnly/CMakeLists.txt b/Tests/SwiftOnly/CMakeLists.txt
index fa8687d..13cf2b1 100644
--- a/Tests/SwiftOnly/CMakeLists.txt
+++ b/Tests/SwiftOnly/CMakeLists.txt
@@ -43,3 +43,14 @@ target_link_libraries(N PUBLIC
# Dummy to make sure generation works with such targets.
add_library(SwiftIface INTERFACE)
target_link_libraries(SwiftOnly PRIVATE SwiftIface)
+
+# @_alwaysEmitIntoClient ensures that the function body is inserted into the
+# swiftmodule instead of as a symbol in the binary itself. I'm doing this to
+# avoid having to link the executable. There are some flags required in order to
+# link an executable into a library that I didn't see CMake emitting for Swift
+# on macOS. AEIC is the easiest workaround that still tests this functionality.
+# Unfortunately, AEIC was only added recently (~Swift 5.2), so we need to check
+# that it is available before using it.
+if(CMAKE_Swift_COMPILER_VERSION VERSION_GREATER_EQUAL 5.2)
+ add_subdirectory("SwiftPlugin")
+endif()
diff --git a/Tests/SwiftOnly/SwiftPlugin/CMakeLists.txt b/Tests/SwiftOnly/SwiftPlugin/CMakeLists.txt
new file mode 100644
index 0000000..4069f16
--- /dev/null
+++ b/Tests/SwiftOnly/SwiftPlugin/CMakeLists.txt
@@ -0,0 +1,5 @@
+add_executable(main main.swift)
+set_target_properties(main PROPERTIES ENABLE_EXPORTS TRUE)
+
+add_library(plugin plugin.swift)
+target_link_libraries(plugin PRIVATE main)
diff --git a/Tests/SwiftOnly/SwiftPlugin/main.swift b/Tests/SwiftOnly/SwiftPlugin/main.swift
new file mode 100644
index 0000000..f5aac51
--- /dev/null
+++ b/Tests/SwiftOnly/SwiftPlugin/main.swift
@@ -0,0 +1,4 @@
+@_alwaysEmitIntoClient
+public func exported() -> Int { 32 }
+
+print(exported())
diff --git a/Tests/SwiftOnly/SwiftPlugin/plugin.swift b/Tests/SwiftOnly/SwiftPlugin/plugin.swift
new file mode 100644
index 0000000..e84f248
--- /dev/null
+++ b/Tests/SwiftOnly/SwiftPlugin/plugin.swift
@@ -0,0 +1,3 @@
+import main
+
+public func importing() -> Int { main.exported() + 1 }