diff options
author | Brad King <brad.king@kitware.com> | 2022-10-28 14:29:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-28 19:38:07 (GMT) |
commit | 024e3d2bf63c118f4a5da3ea872892ab274c697a (patch) | |
tree | f7153c58fd1914a31239fa8ced19a76a743ee728 /Tests/RunCMake/XcodeProject | |
parent | 59ae2543165b836d01b88fe0ba4e22ecd549e239 (diff) | |
download | CMake-024e3d2bf63c118f4a5da3ea872892ab274c697a.zip CMake-024e3d2bf63c118f4a5da3ea872892ab274c697a.tar.gz CMake-024e3d2bf63c118f4a5da3ea872892ab274c697a.tar.bz2 |
Xcode: Put object files in a place that Xcode cleans
Since commit dc5fc898f6 (Xcode: Set object file locations using
TARGET_TEMP_DIR, 2022-09-29, v3.25.0-rc1~64^2~1), `xcodebuild clean`
does not remove the object files in our explicit `TARGET_TEMP_DIR`
because it is not under the `SYMROOT`. Put it there.
Fixes: #24096
Diffstat (limited to 'Tests/RunCMake/XcodeProject')
-rw-r--r-- | Tests/RunCMake/XcodeProject/Clean-build-check.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/XcodeProject/Clean-clean-check.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 5 |
3 files changed, 13 insertions, 2 deletions
diff --git a/Tests/RunCMake/XcodeProject/Clean-build-check.cmake b/Tests/RunCMake/XcodeProject/Clean-build-check.cmake new file mode 100644 index 0000000..605881a --- /dev/null +++ b/Tests/RunCMake/XcodeProject/Clean-build-check.cmake @@ -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() diff --git a/Tests/RunCMake/XcodeProject/Clean-clean-check.cmake b/Tests/RunCMake/XcodeProject/Clean-clean-check.cmake new file mode 100644 index 0000000..76ea8a1 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/Clean-clean-check.cmake @@ -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() diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index fdf4411..573d5f7 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -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() |