Commit 5d29af37 authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Remove ui_*.h on incremental builds

When .ui files are removed from CMakeLists.txt any rules
to generate ui_*.h files are removed and stale files can
be left around and still referencable until picked up
by a clean build
parent fa8f7e0f
......@@ -185,6 +185,8 @@ fi
# the links helps keep it fresh
# - build/Testing/**: old ctest xml files will change over time and removing
# the links helps keep it fresh
# - build/qt/**/ui_*.h: Header files produced from .ui files can remain stale
# if a .ui file is removed from a CMakeLists.txt file
###############################################################################
if [ -z "$BUILD_DIR" ]; then
echo "Build directory not set. Cannot continue"
......@@ -199,6 +201,7 @@ mkdir -p $BUILD_DIR
# Tidy build dir
rm -rf ${BUILD_DIR:?}/bin ${BUILD_DIR:?}/ExternalData ${BUILD_DIR:?}/Testing
find ${BUILD_DIR:?}/qt -name 'ui_*.h' -delete
find ${BUILD_DIR:?} -name 'TEST-*.xml' -delete
if [[ -n ${CLEAN_EXTERNAL_PROJECTS} && "${CLEAN_EXTERNAL_PROJECTS}" == true ]]; then
......@@ -303,13 +306,13 @@ fi
if [[ ${JOB_NAME} == *address* ]]; then
SANITIZER_FLAGS="-DUSE_SANITIZER=Address"
elif [[ ${JOB_NAME} == *memory* ]]; then
SANITIZER_FLAGS="-DUSE_SANITIZER=memory"
elif [[ ${JOB_NAME} == *thread* ]]; then
SANITIZER_FLAGS="-DUSE_SANITIZER=thread"
elif [[ ${JOB_NAME} == *undefined* ]]; then
SANITIZER_FLAGS="-DUSE_SANITIZER=undefined"
fi
......
......@@ -124,7 +124,12 @@ if "!CLEANBUILD!" == "yes" (
if EXIST %BUILD_DIR% (
rmdir /S /Q %BUILD_DIR%\bin %BUILD_DIR%\ExternalData %BUILD_DIR%\Testing
pushd %BUILD_DIR%
for /f %%F in ('dir /b /a-d /S "TEST-*.xml"') do del /Q %%F >/nul
pushd qt
for /f %%F in ('dir /b /a-d /S "ui_*.h"') do del /Q %%F >/nul
popd
popd
if "!CLEAN_EXTERNAL_PROJECTS!" == "true" (
rmdir /S /Q %BUILD_DIR%\eigen-prefix
rmdir /S /Q %BUILD_DIR%\googletest-download %BUILD_DIR%\googletest-src
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment