test/CleanProfileData.cmake
author Tero Marttila <terom@fixme.fi>
Wed, 27 May 2009 23:57:48 +0300
branchnew-lib-errors
changeset 217 7728d6ec3abf
parent 187 5d100c79521a
permissions -rw-r--r--
nexus.c compiles
187
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     1
# 
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     2
# CMake script to clean out all *.gcda files from TEST_OBJECT_DIR
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     3
#
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     4
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     5
# get list
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     6
file (GLOB_RECURSE GCDA_FILES "${TEST_OBJECT_DIR}/*.gcda")
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     7
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
if (GCDA_FILES)
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     9
    message (STATUS "removing .gcda: ${GCDA_FILES}")
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    10
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    11
    # hehehe... dangerous?
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
    file (REMOVE ${GCDA_FILES})
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
endif (GCDA_FILES)
5d100c79521a fix CMake TEST_OBJECT_PATH, ENABLE_TEST_COVERAGE test-target and cleanup of .gcda's
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    14