summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/if.rst20
-rw-r--r--Modules/FindLua50.cmake15
-rw-r--r--Modules/FindLua51.cmake13
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmDebuggerWindowsPipeConnection.cxx17
-rw-r--r--Source/cmDebuggerWindowsPipeConnection.h2
6 files changed, 34 insertions, 35 deletions
diff --git a/Help/command/if.rst b/Help/command/if.rst
index c47c71b..5d85a1f 100644
--- a/Help/command/if.rst
+++ b/Help/command/if.rst
@@ -228,36 +228,36 @@ Comparisons
.. signature:: if(<variable|string> LESS <variable|string>)
:target: LESS
- True if the given string or variable's value is a valid number and less
- than that on the right.
+ True if the given string or variable's value parses as a real number
+ (like a C ``double``) and less than that on the right.
.. signature:: if(<variable|string> GREATER <variable|string>)
:target: GREATER
- True if the given string or variable's value is a valid number and greater
- than that on the right.
+ True if the given string or variable's value parses as a real number
+ (like a C ``double``) and greater than that on the right.
.. signature:: if(<variable|string> EQUAL <variable|string>)
:target: EQUAL
- True if the given string or variable's value is a valid number and equal
- to that on the right.
+ True if the given string or variable's value parses as a real number
+ (like a C ``double``) and equal to that on the right.
.. signature:: if(<variable|string> LESS_EQUAL <variable|string>)
:target: LESS_EQUAL
.. versionadded:: 3.7
- True if the given string or variable's value is a valid number and less
- than or equal to that on the right.
+ True if the given string or variable's value parses as a real number
+ (like a C ``double``) and less than or equal to that on the right.
.. signature:: if(<variable|string> GREATER_EQUAL <variable|string>)
:target: GREATER_EQUAL
.. versionadded:: 3.7
- True if the given string or variable's value is a valid number and greater
- than or equal to that on the right.
+ True if the given string or variable's value parses as a real number
+ (like a C ``double``) and greater than or equal to that on the right.
.. signature:: if(<variable|string> STRLESS <variable|string>)
:target: STRLESS
diff --git a/Modules/FindLua50.cmake b/Modules/FindLua50.cmake
index 0575caa..6ba9008 100644
--- a/Modules/FindLua50.cmake
+++ b/Modules/FindLua50.cmake
@@ -5,28 +5,19 @@
FindLua50
---------
-
-
Locate Lua library.
-This module defines::
-::
+This module defines::
LUA50_FOUND, if false, do not try to link to Lua
LUA_LIBRARIES, both lua and lualib
LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h)
-
-
-Note that the expected include convention is
-
-::
+Note that the expected include convention is::
#include "lua.h"
-and not
-
-::
+and not::
#include <lua/lua.h>
diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake
index 283a3eb..405a7a7 100644
--- a/Modules/FindLua51.cmake
+++ b/Modules/FindLua51.cmake
@@ -5,29 +5,20 @@
FindLua51
---------
-
-
Locate Lua library.
This module defines::
-::
-
LUA51_FOUND, if false, do not try to link to Lua
LUA_LIBRARIES
LUA_INCLUDE_DIR, where to find lua.h
LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
-
-Note that the expected include convention is
-
-::
+Note that the expected include convention is::
#include "lua.h"
-and not
-
-::
+and not::
#include <lua/lua.h>
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 52a5cb9..289f22a 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 27)
-set(CMake_VERSION_PATCH 20230909)
+set(CMake_VERSION_PATCH 20230911)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/cmDebuggerWindowsPipeConnection.cxx b/Source/cmDebuggerWindowsPipeConnection.cxx
index 1c6a2a7..5f6f848 100644
--- a/Source/cmDebuggerWindowsPipeConnection.cxx
+++ b/Source/cmDebuggerWindowsPipeConnection.cxx
@@ -221,13 +221,28 @@ void cmDebuggerPipeClient_WIN32::WaitForConnection()
NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
if (hPipe == INVALID_HANDLE_VALUE) {
auto err = GetLastError();
- throw std::runtime_error("CreateFile failed with " + err);
+ throw std::runtime_error(std::string("CreateFile failed for pipe ") +
+ GetErrorMessage(err));
}
pipes = std::make_unique<DuplexPipe_WIN32>(hPipe);
}
}
+std::string cmDebuggerPipeClient_WIN32::GetErrorMessage(DWORD errorCode)
+{
+ LPSTR message = nullptr;
+ DWORD size = FormatMessageA(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ nullptr, errorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPSTR)&message, 0, nullptr);
+ std::string errorMessage =
+ this->PipeName + ": " + std::string(message, size);
+ LocalFree(message);
+ return errorMessage;
+}
+
bool cmDebuggerPipeClient_WIN32::isOpen()
{
return pipes != nullptr;
diff --git a/Source/cmDebuggerWindowsPipeConnection.h b/Source/cmDebuggerWindowsPipeConnection.h
index 88ed1de..6a57435 100644
--- a/Source/cmDebuggerWindowsPipeConnection.h
+++ b/Source/cmDebuggerWindowsPipeConnection.h
@@ -90,6 +90,8 @@ public:
bool write(void const* buffer, size_t n) override;
private:
+ std::string GetErrorMessage(DWORD errorCode);
+
std::string const PipeName;
std::unique_ptr<DuplexPipe_WIN32> pipes;
};