netgen/cmake
Kirill A. Korinsky 40920f3ec3
Prevent creating malformed version
Let assume that I run a cmake with option `-DNETGEN_VERSION_GIT="v6.2.2204"` (or without this option at all) to avoid calling `git` which won't work when I've downloaded sources from GitHub as `.zip` file.

If I try to compile sources and run it, it fails with error like:
```
libc++abi: terminating with uncaught exception of type std::invalid_argument: stoi: no conversion
``` 
after some digging I've discovered that `netgen_version.hpp` looks like:
```
#ifndef NETGEN_VERSION_HPP_INCLUDED
#define NETGEN_VERSION_HPP_INCLUDED
#define NETGEN_VERSION "6.2.0-v6.2.0.0-v6.2.0.0"
#define NETGEN_VERSION_MAJOR 6
#define NETGEN_VERSION_MINOR 2
#define NETGEN_VERSION_PATCH 0
#define NETGEN_VERSION_TWEAK v6.2.0.0
#define NETGEN_VERSION_HASH "v6.2.0.0"
#endif // NETGEN_VERSION_HPP_INCLUDED
```

This is happened because `string(REGEX REPLACE` copied original string to target and replaces it by regex. If regex doesn't match => it still copied an original value.

So, this commit prevented this mess from happened.
2022-12-07 02:55:27 +01:00
..
cmake_modules Update OCC 2021-09-02 12:52:34 +00:00
external_projects work around issue with LIST_SEPARATOR on MacosM1 2021-12-02 14:32:30 +01:00
check_submodules.cmake Restructure cmake files, build METIS as dependency 2017-02-23 14:54:42 +01:00
cmake_uninstall.cmake.in Restructure cmake files, build METIS as dependency 2017-02-23 14:54:42 +01:00
generate_version_file.cmake Prevent creating malformed version 2022-12-07 02:55:27 +01:00
mic.cmake Restructure cmake files, build METIS as dependency 2017-02-23 14:54:42 +01:00
netgen_fixup.cmake Restructure cmake files, build METIS as dependency 2017-02-23 14:54:42 +01:00
NetgenConfig.cmake.in pip installer 2021-10-27 16:51:41 +02:00
SuperBuild.cmake rework build system, separate gui and non-gui code 2022-05-05 14:39:31 +02:00
tk_macosx.patch Restructure cmake files, build METIS as dependency 2017-02-23 14:54:42 +01:00