Visual Studio C++ include all file in all subfolders of directory

Viewed 4616

In a C++ project in Visual Studio in:

Project Properties > Linker > Input > Addtional Dependencies

I could write $(MyEnvVar)\folderA\*.lib to include all libraries.

But let's say folderB has many subdirectories which each has a set of header files.

If I want to include them all in one go, in:

Project Properties > C/C++ > General > Addtional Include Directories

I would like to write something like: $(MyEnvVar)\folderB\*\ or $(MyEnvVar)\folderB\*\*\ to go one subdirectory deeper in each folder.

This doesn't seem to work.

Optionally I could do $(MyEnvVar)\folderB\ and in my code I would include each file as #include "name_of_subfolder\name_of_file.h". (This is what I want to avoid.)

Is it possible in one line to include all files in all subfolders of a certain folder?

0 Answers
Related