Merge topic 'xcode-obj-dir'

024e3d2bf6 Xcode: Put object files in a place that Xcode cleans

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7843
This commit is contained in:
Brad King
2022-10-31 13:42:10 +00:00
committed by Kitware Robot
9 changed files with 44 additions and 16 deletions
@@ -27,7 +27,7 @@
]
},
{
"path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.c)?\\.o(bj)?$",
"path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(object|build/c_object_lib\\.build)/.*/empty(\\.c)?\\.o(bj)?$",
"isGenerated": true,
"sourceGroupName": "Object Libraries",
"compileGroupLanguage": null,
@@ -57,7 +57,7 @@
{
"name": "Object Libraries",
"sourcePaths": [
"^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.c)?\\.o(bj)?$"
"^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(object|build/c_object_lib\\.build)/.*/empty(\\.c)?\\.o(bj)?$"
]
}
],
@@ -64,7 +64,7 @@
"nameOnDisk": null,
"artifacts": [
{
"path": "^object/.*/empty(\\.c)?\\.o(bj)?$",
"path": "^(object|build/c_object_lib\\.build)/.*/empty(\\.c)?\\.o(bj)?$",
"_dllExtra": false
}
],
@@ -27,7 +27,7 @@
]
},
{
"path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.cxx)?\\.o(bj)?$",
"path": "^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(object|build/cxx_object_lib\\.build)/.*/empty(\\.cxx)?\\.o(bj)?$",
"isGenerated": true,
"sourceGroupName": "Object Libraries",
"compileGroupLanguage": null,
@@ -57,7 +57,7 @@
{
"name": "Object Libraries",
"sourcePaths": [
"^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/object/.*/empty(\\.cxx)?\\.o(bj)?$"
"^.*/Tests/RunCMake/FileAPI/codemodel-v2-build/(object|build/cxx_object_lib\\.build)/.*/empty(\\.cxx)?\\.o(bj)?$"
]
}
],
@@ -64,7 +64,7 @@
"nameOnDisk": null,
"artifacts": [
{
"path": "^object/.*/empty(\\.cxx)?\\.o(bj)?$",
"path": "^(object|build/cxx_object_lib\\.build)/.*/empty(\\.cxx)?\\.o(bj)?$",
"_dllExtra": false
}
],
@@ -0,0 +1,5 @@
set(pattern "${RunCMake_TEST_BINARY_DIR}/build/empty.build/Debug/Objects-normal/*/empty.o")
file(GLOB objs "${pattern}")
if(NOT objs)
set(RunCMake_TEST_FAILED "Expected object does not exist:\n ${pattern}")
endif()
@@ -0,0 +1,5 @@
set(pattern "${RunCMake_TEST_BINARY_DIR}/build/empty.build/Debug/Objects-normal/*/empty.o")
file(GLOB objs "${pattern}")
if(objs)
set(RunCMake_TEST_FAILED "Object file(s) not cleaned:\n ${objs}")
endif()
@@ -2,9 +2,10 @@ include(RunCMake)
function(RunClean)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Clean-build)
run_cmake(Clean)
run_cmake(Clean -DCMAKE_CONFIGURATION_TYPES=Debug)
set(RunCMake_TEST_NO_CLEAN 1)
run_cmake_command(Clean-build xcodebuild clean)
run_cmake_command(Clean-build xcodebuild)
run_cmake_command(Clean-clean xcodebuild clean)
endfunction()
RunClean()