Commit Graph

4 Commits

Author SHA1 Message Date
Steffen Olszewski
0b73f01703 Prevent unintended removal of local CMake variables
Without quotes list expansion happens inside the set-call, if the list is empty,
this actually unsets the variable. This is not intended and could lead to
unwanted side effects. List expansion is not required there, quoting the
variable results in setting the variable to empty for empty lists.
2023-10-20 19:13:54 +02:00
Steffen Olszewski
8cd6dd7c37 Filter file extensions without including the path prefix
Since the file lists contain only valid paths, it is sufficient to anchor
the regular expression at the end only instead of matching the full path.
This prevents regular expression injections.
2023-05-23 19:09:32 +02:00
Steffen Olszewski
7467f14193 Create file lists without using regular expression
Using the path prefix as part of a regular expression can lead to a
regular expression injection, the path might contain regular expression
meta characters that get interpreted. Use cmake_path() instead to filter
path prefixes.
2023-05-23 19:07:18 +02:00
Steffen Olszewski
ff36530506 Add utility function to add source groups for files of a target
This function uses default groups like Visual Studio and additional groups
for files commonly used by CMake builds.

This increases the required CMake version to 3.20.
2023-05-10 21:49:38 +02:00