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

Problem with presets and coverage (No such file or directory) #141

Open
nejcgalof opened this issue Jul 28, 2022 · 1 comment
Open

Problem with presets and coverage (No such file or directory) #141

nejcgalof opened this issue Jul 28, 2022 · 1 comment

Comments

@nejcgalof
Copy link

nejcgalof commented Jul 28, 2022

I don't know if this problem is related to this project, or if the problem is related to CMake or another tool. Anyway, I wrote here, because I am taking this project, and when I add ENABLE_COVERAGE, the coverage, for example, Experimental build target failed. If ENABLE_COVERAGE is off, the coverage step is skipped. This target is related and documented in CTest.

For easier repeating the problem and knowing what I am talking about, I am trying also in FTXUI template from cpp-best-practices, because I know @lefticus is a contributor of Ftxui and project_options and this will be the perfect project for repeating the problem. In this project, I just add ENABLE_COVERAGE in dynamic_project_options and run preset GCC Debug and target Experimental. Is the same problem if I am using different preset configurations. It is also the same if I change from dynamic_project_options to project_options. I am using VSCode and docker all the same setup is defined in the project.

The output of unixlike-clang-debug - Experimental in the project ftxui_template

[cmake] -- Generating done
[cmake] -- Build files have been written to: /workspaces/ftxui_template-main/out/build/unixlike-clang-debug
[build] Starting build
[proc] Executing command: /usr/bin/cmake --build /workspaces/ftxui_template-main/out/build/unixlike-clang-debug --target Experimental
[build] [0/1] cd /workspaces/ftxui_template-main/out/build/unixlike-clang-debug && /usr/bin/ctest -D Experimental
[build]    Site: 06bc8536816d
[build]    Build name: Linux-clang++
[build] Create new tag: 20220728-0821 - Experimental
[build] Configure project
[build]    Each . represents 1024 bytes of output
[build]     .... Size of output: 3K
[build] Build project
[build]    Each symbol represents 1024 bytes of output.
[build]    '!' represents an error and '*' a warning.
[build]     .. Size of output: 1K
[build]    0 Compiler errors
[build]    0 Compiler warnings
[build] Test project /workspaces/ftxui_template-main/out/build/unixlike-clang-debug
[build]     Start 1: unittests.Factorials are computed
[build] 1/5 Test #1: unittests.Factorials are computed ..........................   Passed    0.07 sec
[build]     Start 2: constexpr.Factorials are computed with constexpr
[build] 2/5 Test #2: constexpr.Factorials are computed with constexpr ...........   Passed    0.07 sec
[build]     Start 3: relaxed_constexpr.Factorials are computed with constexpr
[build] 3/5 Test #3: relaxed_constexpr.Factorials are computed with constexpr ...   Passed    0.06 sec
[build]     Start 4: cli.has_help
[build] 4/5 Test #4: cli.has_help ...............................................   Passed    0.28 sec
[build]     Start 5: cli.version_matches
[build] 5/5 Test #5: cli.version_matches ........................................   Passed    0.31 sec
[build] 
[build] 100% tests passed, 0 tests failed out of 5
[build] 
[build] Total Test time (real) =   0.90 sec
[build] Performing coverage
[build]    Processing coverage (each . represents one file):
[build] No such file or directory
[build] Problem running coverage on file: /workspaces/ftxui_template-main/out/build/unixlike-clang-debug/src/CMakeFiles/intro.dir/main.cpp.gcda
[build] Command produced error: No such file or directory
[build]  Cannot find any coverage files. Ignoring Coverage request.

The problem is in /workspaces/ftxui_template-main/out/build/unixlike-clang-debug/src/CMakeFiles/intro.dir exist .gcda, .gcno and .o file.

So my question is if I am doing something wrong? I'm new in CMake preset and with this project. Also, it seems like something is not well set for CTest when the coverage is enabled. I have the same problem in my project as in Ftxui.
Also, any help on how to investigate, test, and fix the problem will be very pleasant. Thank you for all your tips and investigations.

Upvote & Fund

  • I am using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.

  • Thank you in advance for helping prioritize & fund our backlog.

Fund with Polar
@aminya
Copy link
Owner

aminya commented Jul 30, 2022

I don't control the FTXUI template. Please try this with the official project_options template:
https://github.com/aminya/cpp_vcpkg_project

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

2 participants