Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make platform designation precise. #23

Open
suikan4github opened this issue Jan 24, 2022 · 0 comments
Open

Make platform designation precise. #23

suikan4github opened this issue Jan 24, 2022 · 0 comments

Comments

@suikan4github
Copy link
Owner

suikan4github commented Jan 24, 2022

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
@suikan4github suikan4github changed the title Error regarding the GCOV during Link Make platform designation precise. Jan 24, 2022
suikan4github added a commit that referenced this issue Jan 24, 2022
Issue #23
The existing *gcda deletion  was problematic when it is on Windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant