-
-
Notifications
You must be signed in to change notification settings - Fork 413
[WIP] CMake build with Visual Studio support #289
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
Conversation
This reverts commit 27040edaa6b4a96632c5dc631e5dffda3140c8e5.
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 |
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 |
* 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
Based on original work by Rashad Kanavath in 2020 with pull request: #289 This update introduces preliminary support for building and installing GRASS GIS using CMake across multiple platforms, including Windows with MSVS, Linux, and macOS. The installation can be performed using either the traditional GRASS file structure or a structure that complies with the Filesystem Hierarchy Standard (FHS). Co-authored-by: Rashad Kanavath <mohammedrashadkm@gmail.com> Co-authored-by: Markus Neteler <neteler@gmail.com> Co-authored-by: Loïc Bartoletti <loic.bartoletti@oslandia.com> Co-authored-by: Aaron Saw <aaronsms@u.nus.edu> Co-authored-by: Nicklas Larsson <n_larsson@yahoo.com> Co-authored-by: Huidae Cho <grass4u@gmail.com> Co-authored-by: Mahesh Maddineni <maddinenimahesh1998@gmail.com> Co-authored-by: Kandel Nelson <075bce084.nelson@pcampus.edu.np> Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
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 #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 #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 #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 Co-authored-by: Rashad Kanavath <mohammedrashadkm@gmail.com>
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 #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 Co-authored-by: Rashad Kanavath <mohammedrashadkm@gmail.com>
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,