mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 10:20:56 -06:00
create_test_sourcelist: Add support for more special characters in paths
Use `cmSystemTools::MakeCidentifier` to robustly create a valid function name to which the test path maps. Fixes: #23855
This commit is contained in:
@@ -87,9 +87,7 @@ bool cmCreateTestSourceList(std::vector<std::string> const& args,
|
||||
func_name = cmSystemTools::GetFilenameWithoutLastExtension(*i);
|
||||
}
|
||||
cmSystemTools::ConvertToUnixSlashes(func_name);
|
||||
std::replace(func_name.begin(), func_name.end(), ' ', '_');
|
||||
std::replace(func_name.begin(), func_name.end(), '/', '_');
|
||||
std::replace(func_name.begin(), func_name.end(), ':', '_');
|
||||
func_name = cmSystemTools::MakeCidentifier(func_name);
|
||||
bool already_declared =
|
||||
std::find(tests_func_name.begin(), tests_func_name.end(), func_name) !=
|
||||
tests_func_name.end();
|
||||
|
||||
Reference in New Issue
Block a user