Make files visible in generated Visual Studio solution
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.7k
- Forks
- 772
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 9
Description
If you generate a Visual studio solution from the current CMake the GSL headers like algorithm and assert don't appear. The only way you seem to be able to see them is to open a test like algorithm_tests.cpp and then do a "Go to document" on a line like #include <gsl/algorithm>.
In my local copy I added the following
add_custom_target(include SOURCES
gsl/algorithm
gsl/assert
gsl/byte
gsl/gsl
gsl/narrow
gsl/pointers
gsl/span
gsl/span_ext
gsl/util
gsl/zstring
)
But I am sure that is the wrong way to do it.
I also added
set(SolutionItems
.clang-format
.gitattributes
.gitignore
CMakeSettings.json
CONTRIBUTING.md
LICENSE
README.md
SECURITY.md
ThirdPartyNotices.txt)
set_property(DIRECTORY APPEND PROPERTY VS_SOLUTION_ITEMS ${SolutionItems})
This makes all these files appears in the "Solution Items" folder in the IDE which is super useful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current CMake configuration and generate a Visual Studio solution, then inspect how algorithm_tests.cpp references headers such as gsl/algorithm and gsl/assert. Determine the appropriate CMake entries for exposing the GSL headers and repository files, and verify that the generated solution displays them in the expected locations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100