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

Wildcard support #123

Open
jaenster opened this issue Oct 20, 2020 · 0 comments
Open

Wildcard support #123

jaenster opened this issue Oct 20, 2020 · 0 comments

Comments

@jaenster
Copy link

First of all; Great project!

The issue: While it was an easy fix for me to do, you might consider adding this automatically.

Some projects, like the one i been converting, use the visual studio specific method of wildcards in the source files.

In this case it loads features\*.cpp and framework\*.cpp

The CMakeList file that comes out contains this;

set(no_group_source_files
    "features/*.cpp"
    "framework/*.cpp"
)

Which is invalid, as CMake cant find the file features/*.cpp, as it doesn't understand wildcards, it tries to load the literal file feature/*.cpp, which obviously don't exists

I converted this to

file(GLOB_RECURSE no_group_source_files RELATIVE ${CMAKE_SOURCE_DIR} "features/*.cpp" "framework/*.cpp")

Which works flawlessly, however i have to reload it after adding a file, in this use case not a big issue.

Maybe its an idea to automatically convert wildcards to GLOB's?

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