summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2024-06-02 09:17:43 (GMT)
committerCraig Scott <craig.scott@crascit.com>2024-09-27 22:03:26 (GMT)
commit188b7e73395d037a43854fc0de4a46466ba49f4f (patch)
treea35b6026725eacd25b3cd903efea2fd98fdecbce
parent0aa445bb9c5f307ad7be1e38bc04af5b17864c12 (diff)
downloadCMake-188b7e73395d037a43854fc0de4a46466ba49f4f.zip
CMake-188b7e73395d037a43854fc0de4a46466ba49f4f.tar.gz
CMake-188b7e73395d037a43854fc0de4a46466ba49f4f.tar.bz2
GoogleTest: Minor reformatting
- Wrap long lines in file() calls. - Condense some unnecessary and confusing quotes/spaces in a call many arguments built up in a string.
-rw-r--r--Modules/GoogleTest.cmake47
1 files changed, 29 insertions, 18 deletions
diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake
index dc445de..2c909cf 100644
--- a/Modules/GoogleTest.cmake
+++ b/Modules/GoogleTest.cmake
@@ -584,20 +584,20 @@ function(gtest_discover_tests TARGET)
" NOT \"${ctest_tests_file}\" IS_NEWER_THAN \"\${CMAKE_CURRENT_LIST_FILE}\")\n"
" include(\"${CMAKE_ROOT}/Modules/GoogleTestAddTests.cmake\")" "\n"
" gtest_discover_tests_impl(" "\n"
- " TEST_EXECUTABLE" " [==[" "$<TARGET_FILE:${TARGET}>" "]==]" "\n"
- " TEST_EXECUTOR" " [==[" "${test_executor}" "]==]" "\n"
- " TEST_WORKING_DIR" " [==[" "${_WORKING_DIRECTORY}" "]==]" "\n"
- " TEST_EXTRA_ARGS" " [==[" "${_EXTRA_ARGS}" "]==]" "\n"
- " TEST_PROPERTIES" " [==[" "${_PROPERTIES}" "]==]" "\n"
- " TEST_PREFIX" " [==[" "${_TEST_PREFIX}" "]==]" "\n"
- " TEST_SUFFIX" " [==[" "${_TEST_SUFFIX}" "]==]" "\n"
- " TEST_FILTER" " [==[" "${_TEST_FILTER}" "]==]" "\n"
- " NO_PRETTY_TYPES" " [==[" "${_NO_PRETTY_TYPES}" "]==]" "\n"
- " NO_PRETTY_VALUES" " [==[" "${_NO_PRETTY_VALUES}" "]==]" "\n"
- " TEST_LIST" " [==[" "${_TEST_LIST}" "]==]" "\n"
- " CTEST_FILE" " [==[" "${ctest_tests_file}" "]==]" "\n"
- " TEST_DISCOVERY_TIMEOUT" " [==[" "${_DISCOVERY_TIMEOUT}" "]==]" "\n"
- " TEST_XML_OUTPUT_DIR" " [==[" "${_XML_OUTPUT_DIR}" "]==]" "\n"
+ " TEST_EXECUTABLE" " [==[$<TARGET_FILE:${TARGET}>]==]" "\n"
+ " TEST_EXECUTOR" " [==[${test_executor}]==]" "\n"
+ " TEST_WORKING_DIR" " [==[${_WORKING_DIRECTORY}]==]" "\n"
+ " TEST_EXTRA_ARGS" " [==[${_EXTRA_ARGS}]==]" "\n"
+ " TEST_PROPERTIES" " [==[${_PROPERTIES}]==]" "\n"
+ " TEST_PREFIX" " [==[${_TEST_PREFIX}]==]" "\n"
+ " TEST_SUFFIX" " [==[${_TEST_SUFFIX}]==]" "\n"
+ " TEST_FILTER" " [==[${_TEST_FILTER}]==]" "\n"
+ " NO_PRETTY_TYPES" " [==[${_NO_PRETTY_TYPES}]==]" "\n"
+ " NO_PRETTY_VALUES" " [==[${_NO_PRETTY_VALUES}]==]" "\n"
+ " TEST_LIST" " [==[${_TEST_LIST}]==]" "\n"
+ " CTEST_FILE" " [==[${ctest_tests_file}]==]" "\n"
+ " TEST_DISCOVERY_TIMEOUT" " [==[${_DISCOVERY_TIMEOUT}]==]" "\n"
+ " TEST_XML_OUTPUT_DIR" " [==[${_XML_OUTPUT_DIR}]==]" "\n"
" )" "\n"
" endif()" "\n"
" include(\"${ctest_tests_file}\")" "\n"
@@ -608,12 +608,23 @@ function(gtest_discover_tests TARGET)
if(GENERATOR_IS_MULTI_CONFIG)
foreach(_config ${CMAKE_CONFIGURATION_TYPES})
- file(GENERATE OUTPUT "${ctest_file_base}_include-${_config}.cmake" CONTENT "${ctest_include_content}" CONDITION $<CONFIG:${_config}>)
+ file(GENERATE
+ OUTPUT "${ctest_file_base}_include-${_config}.cmake"
+ CONTENT "${ctest_include_content}"
+ CONDITION $<CONFIG:${_config}>
+ )
endforeach()
- file(WRITE "${ctest_include_file}" "include(\"${ctest_file_base}_include-\${CTEST_CONFIGURATION_TYPE}.cmake\")")
+ file(WRITE "${ctest_include_file}"
+ "include(\"${ctest_file_base}_include-\${CTEST_CONFIGURATION_TYPE}.cmake\")"
+ )
else()
- file(GENERATE OUTPUT "${ctest_file_base}_include.cmake" CONTENT "${ctest_include_content}")
- file(WRITE "${ctest_include_file}" "include(\"${ctest_file_base}_include.cmake\")")
+ file(GENERATE
+ OUTPUT "${ctest_file_base}_include.cmake"
+ CONTENT "${ctest_include_content}"
+ )
+ file(WRITE "${ctest_include_file}"
+ "include(\"${ctest_file_base}_include.cmake\")"
+ )
endif()
else()