-
-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] CMake build with Visual Studio support #289
Conversation
This reverts commit 27040edaa6b4a96632c5dc631e5dffda3140c8e5.
trivial changes (comment style) applied
I recommend to hold on review (unless checking cmake) on this PR. I will make seperate PR each with its own issues later. |
This is not a search and replace of __MING32__ with _WIN32. There are places where __MINGW32__ is still used and all changes are tested with MSVC 2019 compiler. Although, this commit alone will not work on MSVC because there are plenty of other things to be done which are seperated into multiple PR. PR OSGeo#289 is the one that "works" on MSVC and unix as well. But that contains too many changes which shouldn't in a single PR. Even though this PR alone won't compile GRASS GIS on MSVC, it sure will not break existing compilers which I think is very important. Complete support for MSVC will be ready after 2/3 PRs OSGeo#289
This is not a search and replace of __MING32__ with _WIN32. There are places where __MINGW32__ is still used and all changes are tested with MSVC 2019 compiler. Although, this commit alone will not work on MSVC because there are plenty of other things to be done which are seperated into multiple PR. PR OSGeo#289 is the one that "works" on MSVC and unix as well. But that contains too many changes which shouldn't in a single PR. Even though this PR alone won't compile GRASS GIS on MSVC, it sure will not break existing compilers which I think is very important. Complete support for MSVC will be ready after 2/3 PRs OSGeo#289
This is not a search and replace of __MING32__ with _WIN32. There are places where __MINGW32__ is still used and all changes are tested with MSVC 2019 compiler. Although, this commit alone will not work on MSVC because there are plenty of other things to be done which are seperated into multiple PR. PR OSGeo#289 is the one that "works" on MSVC and unix as well. But that contains too many changes which shouldn't in a single PR. Even though this PR alone won't compile GRASS GIS on MSVC, it sure will not break existing compilers which I think is very important. Complete support for MSVC will be ready after 2/3 PRs OSGeo#289
FYI: I have locally rebased this PR and will first separate out the |
- use of `INFINITY` rather than only division by zero (this is supported by gcc and other compilers but not on Windows) - use of `NAN` rather than only division by zero Extracted from WIP PR OSGeo#289
See #2681 |
Note that latest work on CMake is in #348. |
Yes, I'm aware of it. I rebased this PR locally to extract the C related changes into a new PR. |
I have rebased this PR to |
- use of `INFINITY` rather than only division by zero (this is supported by gcc and other compilers but not on Windows) - use of `NAN` rather than only division by zero Extracted from WIP PR OSGeo#289 Further changes on top: - fix indentation - revert void* arithmetic change - remove superfluous comments - use 0 (zero) to init integers - 0/0 = NAN, 1/0 = INFINITY - Include math.h for Windows - Use c++ include - r.series: add INFINITY - apply clang-format to match reformatting in `main` by using `for i in $(gh pr view 2681 --json files --jq '.files.[].path') ; do clang-format -i $i ; done` Co-authored-by: @rkanavath Co-authored-by: @nilason
* cmake support preparation: use of INFINITY and NAN - use of `INFINITY` rather than only division by zero (this is supported by gcc and other compilers but not on Windows) - use of `NAN` rather than only division by zero Extracted from WIP PR #289 Further changes on top: - fix indentation - revert void* arithmetic change - remove superfluous comments - use 0 (zero) to init integers - 0/0 = NAN, 1/0 = INFINITY - Include math.h for Windows - Use c++ include - r.series: add INFINITY - apply clang-format to match reformatting in `main` by using `for i in $(gh pr view 2681 --json files --jq '.files.[].path') ; do clang-format -i $i ; done` Co-authored-by: @rkanavath Co-authored-by: @nilason
* cmake support preparation: use of INFINITY and NAN - use of `INFINITY` rather than only division by zero (this is supported by gcc and other compilers but not on Windows) - use of `NAN` rather than only division by zero Extracted from WIP PR OSGeo#289 Further changes on top: - fix indentation - revert void* arithmetic change - remove superfluous comments - use 0 (zero) to init integers - 0/0 = NAN, 1/0 = INFINITY - Include math.h for Windows - Use c++ include - r.series: add INFINITY - apply clang-format to match reformatting in `main` by using `for i in $(gh pr view 2681 --json files --jq '.files.[].path') ; do clang-format -i $i ; done` Co-authored-by: @rkanavath Co-authored-by: @nilason
* cmake support preparation: use of INFINITY and NAN - use of `INFINITY` rather than only division by zero (this is supported by gcc and other compilers but not on Windows) - use of `NAN` rather than only division by zero Extracted from WIP PR OSGeo#289 Further changes on top: - fix indentation - revert void* arithmetic change - remove superfluous comments - use 0 (zero) to init integers - 0/0 = NAN, 1/0 = INFINITY - Include math.h for Windows - Use c++ include - r.series: add INFINITY - apply clang-format to match reformatting in `main` by using `for i in $(gh pr view 2681 --json files --jq '.files.[].path') ; do clang-format -i $i ; done` Co-authored-by: @rkanavath Co-authored-by: @nilason
Hello all,
This is a very BIG pr! that adds cmake support for GRASS GIS!.
I have been working on and off mostly for fun!. Initial work started on grass-ci fork and then I recently rebased changes against proper upstream.
This new CMake support comes with Visual Studio support (adding a bunch of ifdef, declspec etc..). This PR allows windows users to use native C compiler and not MINGW. PR itself does not add anything to break MINGW support.
There are still some missing bits required in cmake build such as man pages, locale, make install target.
Current code can build all grass that can be run from build directory. I had tagged with "WIP".
Reviews and feedback are welcome,