Skip to content

Make platform designation precise.  #23

@suikan4github

Description

@suikan4github

Currently, we designate OS as follows when delete gcda data :

if(NOT MSVC)
# Delete the gcov data file before linking. Otherwise, we will get many errors.
add_custom_command(
TARGET ${TEST_EXECUTABLE_NAME} PRE_LINK
COMMAND find . -name "*.gcda" -delete
COMMENT "Deleting *.gcda files under ${CMAKE_BINARY_DIR}"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
VERBATIM)
endif()

This is OK when the target is MSVC on the WIndows. But fail if the target is GCC on the WIndows. Perhaps, we should change as followings :

if (UNIX)
elseif (WIN32)
endif()

In Windows, the following command can work in both Powershell and command.com :

powershell -c remove-item -include *.gcda -recurse

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions