diff options
author | Brad King <brad.king@kitware.com> | 2023-08-02 16:11:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-08-02 16:11:11 (GMT) |
commit | 1972a7b6e36723c67bfeaa996ce075de25b23169 (patch) | |
tree | 485dcda80e72df7c4376c49b4c92760282bc05f8 /Tests | |
parent | 1fd423d36885ba3808d706fb2e9ea924f15efa92 (diff) | |
parent | 0d1529000d3b52cc3468d90696f5b5b70616bb85 (diff) | |
download | CMake-1972a7b6e36723c67bfeaa996ce075de25b23169.zip CMake-1972a7b6e36723c67bfeaa996ce075de25b23169.tar.gz CMake-1972a7b6e36723c67bfeaa996ce075de25b23169.tar.bz2 |
Merge branch 'backport-revert-vs-show-cmake-files'
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/FileAPI/codemodel-v2-check.py | 229 | ||||
-rw-r--r-- | Tests/RunCMake/VS10Project/CMakeInputs-check.cmake | 25 | ||||
-rw-r--r-- | Tests/RunCMake/VS10Project/CMakeInputs.cmake | 0 | ||||
-rw-r--r-- | Tests/RunCMake/VS10Project/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/add_custom_command/ConfigureFile.cmake | 9 | ||||
-rw-r--r-- | Tests/RunCMake/add_custom_command/ConfigureFile.in | 1 | ||||
-rw-r--r-- | Tests/RunCMake/add_custom_command/RunCMakeTest.cmake | 1 |
7 files changed, 11 insertions, 255 deletions
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py index b669543..8911e18 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py +++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py @@ -897,216 +897,6 @@ def gen_check_targets(c, g, inSource): # The json files have data for Xcode. Substitute data for VS. e["sources"] = [ { - "path": "^CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^alias/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^codemodel-v2\\.cmake$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^custom/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^cxx/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^framework/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^dir/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^dir/dir/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^fileset/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^imported/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^include_test\\.cmake$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^interface/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^object/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { - "path": "^subdir/CMakeLists\\.txt$", - "isGenerated": None, - "fileSetName": None, - "sourceGroupName": "", - "compileGroupLanguage": None, - "backtrace": [ - { - "file": "^CMakeLists\\.txt$", - "line": None, - "command": None, - "hasParent": False, - }, - ], - }, - { "path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/([0-9a-f]+/)?generate\\.stamp\\.rule$", "isGenerated": True, "fileSetName": None, @@ -1124,25 +914,6 @@ def gen_check_targets(c, g, inSource): ] e["sourceGroups"] = [ { - "name": "", - "sourcePaths": [ - "^CMakeLists\\.txt$", - "^alias/CMakeLists\\.txt$", - "^codemodel-v2\\.cmake$", - "^custom/CMakeLists\\.txt$", - "^cxx/CMakeLists\\.txt$", - "^framework/CMakeLists\\.txt$", - "^dir/CMakeLists\\.txt$", - "^dir/dir/CMakeLists\\.txt$", - "^fileset/CMakeLists\\.txt$", - "^imported/CMakeLists\\.txt$", - "^include_test\\.cmake$", - "^interface/CMakeLists\\.txt$", - "^object/CMakeLists\\.txt$", - "^subdir/CMakeLists\\.txt$", - ], - }, - { "name": "CMake Rules", "sourcePaths": [ "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/CMakeFiles/([0-9a-f]+/)?generate\\.stamp\\.rule$", diff --git a/Tests/RunCMake/VS10Project/CMakeInputs-check.cmake b/Tests/RunCMake/VS10Project/CMakeInputs-check.cmake deleted file mode 100644 index a125574..0000000 --- a/Tests/RunCMake/VS10Project/CMakeInputs-check.cmake +++ /dev/null @@ -1,25 +0,0 @@ -set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/ZERO_CHECK.vcxproj") -if(NOT EXISTS "${vcProjectFile}") - set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.") - return() -endif() - -set(found_CMakeInputs 0) -file(STRINGS "${vcProjectFile}" lines) -foreach(line IN LISTS lines) - if(line MATCHES "<([A-Za-z0-9_]+) +Include=.*CMakeInputs.cmake") - set(rule "${CMAKE_MATCH_1}") - if(NOT rule STREQUAL "None") - set(RunCMake_TEST_FAILED "CMakeInputs.cmake referenced as ${rule} instead of None") - return() - endif() - if(found_CMakeInputs) - set(RunCMake_TEST_FAILED "CMakeInputs.cmake referenced multiple times") - return() - endif() - set(found_CMakeInputs 1) - endif() -endforeach() -if(NOT found_CMakeInputs) - set(RunCMake_TEST_FAILED "CMakeInputs.cmake not referenced") -endif() diff --git a/Tests/RunCMake/VS10Project/CMakeInputs.cmake b/Tests/RunCMake/VS10Project/CMakeInputs.cmake deleted file mode 100644 index e69de29..0000000 --- a/Tests/RunCMake/VS10Project/CMakeInputs.cmake +++ /dev/null diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake index cb1a5d5..669049a 100644 --- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake +++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake @@ -7,7 +7,6 @@ if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND CMAKE_C_COMPILER_VERSION VERSION_GREA run_cmake(LanguageStandard) endif() -run_cmake(CMakeInputs) run_cmake(CustomCommandGenex) if(NOT RunCMake_GENERATOR MATCHES "^Visual Studio 1[1-5] ") run_cmake(CustomCommandParallel) diff --git a/Tests/RunCMake/add_custom_command/ConfigureFile.cmake b/Tests/RunCMake/add_custom_command/ConfigureFile.cmake new file mode 100644 index 0000000..ca53a6c --- /dev/null +++ b/Tests/RunCMake/add_custom_command/ConfigureFile.cmake @@ -0,0 +1,9 @@ +configure_file(ConfigureFile.in foo.txt @ONLY) +add_custom_target(foo) +add_custom_command( + OUTPUT bar.txt + MAIN_DEPENDENCY ConfigureFile.in # Attach to input of configure_file + DEPENDS foo + COMMAND ${CMAKE_COMMAND} -E copy foo.txt bar.txt + ) +add_custom_target(bar DEPENDS bar.txt) diff --git a/Tests/RunCMake/add_custom_command/ConfigureFile.in b/Tests/RunCMake/add_custom_command/ConfigureFile.in new file mode 100644 index 0000000..f89fc33 --- /dev/null +++ b/Tests/RunCMake/add_custom_command/ConfigureFile.in @@ -0,0 +1 @@ +# ConfigureFile case diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake index 6c677c0..713b269 100644 --- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake @@ -7,6 +7,7 @@ run_cmake(BadArgument) run_cmake(BadByproduct) run_cmake(BadOutput) run_cmake(BadCommand) +run_cmake(ConfigureFile) run_cmake(GeneratedProperty) run_cmake(LiteralQuotes) run_cmake(NoArguments) |