mirror of
https://github.com/reactos/CMake.git
synced 2025-01-30 00:02:22 +00:00
Merge topic 'uninitialized-var-in-if'
54fd9e3 fix uninitialized var in if(NOT foo bar STREQUAL "foo bar")
This commit is contained in:
commit
30620e7477
@ -910,6 +910,7 @@ bool cmIfCommand::IsTrue(const std::vector<std::string> &args,
|
||||
if (newArgs.size() != 1)
|
||||
{
|
||||
errorString = "Unknown arguments specified";
|
||||
status = cmake::FATAL_ERROR;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
2
Tests/CMakeTests/If-Invalid-Argument.cmake
Normal file
2
Tests/CMakeTests/If-Invalid-Argument.cmake
Normal file
@ -0,0 +1,2 @@
|
||||
if (NOT foo bar STREQUAL "foo bar")
|
||||
endif()
|
@ -156,3 +156,11 @@ foreach(_bad 2x -2x)
|
||||
endforeach()
|
||||
|
||||
test_vars("")
|
||||
|
||||
set(Invalid-Argument-RESULT 1)
|
||||
set(Invalid-Argument-STDERR ".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?If-Invalid-Argument.cmake:1 \\(if\\):.*Unknown arguments specified.*")
|
||||
|
||||
include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake")
|
||||
check_cmake_test(If
|
||||
Invalid-Argument
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user