diff options
author | Brad King <brad.king@kitware.com> | 2022-08-18 11:57:40 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-08-18 11:57:48 (GMT) |
commit | eee5616336066b3451272615e144902ff7edf057 (patch) | |
tree | 828f64164473764a1e4d126105728a87df9f9ea0 | |
parent | b59615e92411261e41c58c3a721c5b9bd3a50459 (diff) | |
parent | f0802b2f500447aca8cd0db3fc3ce802d7de8235 (diff) | |
download | CMake-eee5616336066b3451272615e144902ff7edf057.zip CMake-eee5616336066b3451272615e144902ff7edf057.tar.gz CMake-eee5616336066b3451272615e144902ff7edf057.tar.bz2 |
Merge topic 'create_test_sourcelist-special-chars'
f0802b2f50 create_test_sourcelist: Add support for more special characters in paths
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7587
-rw-r--r-- | Source/cmCreateTestSourceList.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx index 2a52d1a..75c25e3 100644 --- a/Source/cmCreateTestSourceList.cxx +++ b/Source/cmCreateTestSourceList.cxx @@ -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(); |