diff options
-rw-r--r-- | Modules/FindPython/Support.cmake | 2 | ||||
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmSeparateArgumentsCommand.cxx | 5 | ||||
-rw-r--r-- | Tests/RunCMake/separate_arguments/NativeCommand.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/separate_arguments/UnixCommand.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/separate_arguments/WindowsCommand.cmake | 5 |
6 files changed, 22 insertions, 2 deletions
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index 7de2d29..2b911ae 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -22,7 +22,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR) message (FATAL_ERROR "FindPython: INTERNAL ERROR") endif() if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "3") - set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) + set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "2") set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) else() diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index c988b59..92b1e80 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1984,7 +1984,7 @@ cmFileListGeneratorBase* cmFileListGeneratorBase::SetNext( bool cmFileListGeneratorBase::Consider(std::string const& fullPath, cmFileList& listing) { - if (!cmSystemTools::FileIsDirectory(fullPath)) { + if (!fullPath.empty() && !cmSystemTools::FileIsDirectory(fullPath)) { return false; } if (this->Next) { diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx index 7e501a2..52b1a44 100644 --- a/Source/cmSeparateArgumentsCommand.cxx +++ b/Source/cmSeparateArgumentsCommand.cxx @@ -80,6 +80,11 @@ bool cmSeparateArgumentsCommand(std::vector<std::string> const& args, return false; } + if (unparsedArguments.empty()) { + status.GetMakefile().AddDefinition(var, {}); + return true; + } + std::string& command = unparsedArguments.front(); if (command.empty()) { diff --git a/Tests/RunCMake/separate_arguments/NativeCommand.cmake b/Tests/RunCMake/separate_arguments/NativeCommand.cmake index 1cb009e..0051a79 100644 --- a/Tests/RunCMake/separate_arguments/NativeCommand.cmake +++ b/Tests/RunCMake/separate_arguments/NativeCommand.cmake @@ -17,3 +17,8 @@ if(NOT "${native_out}" STREQUAL "${native_exp}") message(FATAL_ERROR "separate_arguments native-style failed. " "Expected\n [${native_exp}]\nbut got\n [${native_out}]\n") endif() + +separate_arguments(empty_out NATIVE_COMMAND) +if(NOT empty_out STREQUAL "") + message(FATAL_ERROR "separate_arguments native-style failed on no arguments") +endif() diff --git a/Tests/RunCMake/separate_arguments/UnixCommand.cmake b/Tests/RunCMake/separate_arguments/UnixCommand.cmake index 0b5767a..c56cd63 100644 --- a/Tests/RunCMake/separate_arguments/UnixCommand.cmake +++ b/Tests/RunCMake/separate_arguments/UnixCommand.cmake @@ -6,3 +6,8 @@ if(NOT "${unix_out}" STREQUAL "${unix_exp}") message(FATAL_ERROR "separate_arguments unix-style failed. " "Expected\n [${unix_exp}]\nbut got\n [${unix_out}]\n") endif() + +separate_arguments(empty_out UNIX_COMMAND) +if(NOT empty_out STREQUAL "") + message(FATAL_ERROR "separate_arguments unix-style failed on no arguments") +endif() diff --git a/Tests/RunCMake/separate_arguments/WindowsCommand.cmake b/Tests/RunCMake/separate_arguments/WindowsCommand.cmake index 86aa14a..cd07494 100644 --- a/Tests/RunCMake/separate_arguments/WindowsCommand.cmake +++ b/Tests/RunCMake/separate_arguments/WindowsCommand.cmake @@ -6,3 +6,8 @@ if(NOT "${windows_out}" STREQUAL "${windows_exp}") message(FATAL_ERROR "separate_arguments windows-style failed. " "Expected\n [${windows_exp}]\nbut got\n [${windows_out}]\n") endif() + +separate_arguments(empty_out WINDOWS_COMMAND) +if(NOT empty_out STREQUAL "") + message(FATAL_ERROR "separate_arguments windows-style failed on no arguments") +endif() |