mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Tests: Add case covering GoogleTest odd PROPERTIES warning
Follow up commit 1b2f3287f7 (GoogleTest: Restore toleration
of odd test PROPERTIES count, 2026-07-30, v4.4.2~1^2).
Issue: #28004
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
^CMake Warning \(author\) at [^
|
||||
]*/Modules/GoogleTest.cmake:[0-9]+ \(message\):
|
||||
PROPERTIES should be key-value pairs. Ignoring unpaired key 'PROP2'.
|
||||
Call Stack \(most recent call first\):
|
||||
PropertiesOdd.cmake:[0-9]+ \(gtest_discover_tests\)
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers\. Use -Wno-author to suppress it\.$
|
||||
@@ -0,0 +1,8 @@
|
||||
add_executable(example IMPORTED)
|
||||
set_property(TARGET example PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/example)
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(example DISCOVERY_MODE PRE_TEST
|
||||
PROPERTIES
|
||||
PROP1 VAL1
|
||||
PROP2 # no VAL2
|
||||
)
|
||||
@@ -11,6 +11,8 @@ else()
|
||||
set(fs_delay 1.125)
|
||||
endif()
|
||||
|
||||
run_cmake(PropertiesOdd)
|
||||
|
||||
function(run_GoogleTest DISCOVERY_MODE)
|
||||
# Use a single build tree for a few tests without cleaning.
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/GoogleTest-build)
|
||||
|
||||
Reference in New Issue
Block a user