Skip to content
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

A native port for Windows #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

sdebionne
Copy link

Add a Visual Studio solution to build a native port of UDUnits2 on
Windows. Some POSIX specific routines are ported as well. The test suite
can be run from the test project and gives the following results :

Run Summary: Type Total Ran Passed Failed Inactive
suites 1 1 n/a 0 0
tests 35 35 33 2 0
asserts 833 833 830 3 n/a

A quick look at the 3 failed shows that they are mainly related to
formating of numbers, e.g. 1.2e018 instead of 1.2e18 (mind the extra
zero).
Test config is Win7/64 with msvc 11 (aka 2012)

Build instructions are in the win subdirectory.

The implementation mainly consists in macro testing either _WIN32 or _MSC_VER
whichever is more relevant.

Add winconfig.h used by the Windows port
Add a Visual Studio solution to build a native port of UDUnits2 on
Windows. Some POSIX specific routines are ported as well. The test suite
can be run from the test project and gives the following results :

Run Summary:    Type  Total    Ran Passed Failed Inactive
suites      1      1    n/a      0        0
tests     35     35     33      2        0
asserts    833    833    830      3      n/a

A quick look at the 3 failed shows that they are mainly related to
formating of numbers, e.g. 1.2e018 instead of 1.2e18 (mind the extra
zero).
Test config is Win7/64 with msvc 11

Build instructions are in the win subdirectory.
Fix formatting of real numbers so that all unit tests pass.
Add .gitignore to ignore all Visual Studio generated files.
Add a batch file that shows how to combine the udunits library with the
expat and port library so that a single udunits library is required when
linking.
@semmerson semmerson self-assigned this Jun 30, 2014
@rsignell-usgs
Copy link

@sdebionne, I just discovered this pull request from a year ago, and it looks like exactly what the community needs -- a native Windows port with expat and testing suite included! I'd like to test this out but would like to compile with MS Visual Studio 2008 to ensure compatibility with python 2.7.

Do you have the ability to save your Visual Studio 2012 (VS11) solution as a Visual Studio 2008 solution?

(I tried using the Visual Studio conversion tool at https://vsprojectconverter.codeplex.com/ but it did not work (produced an exception on import of VS11 solution file!).

@rsignell-usgs
Copy link

@WardF, do you (or somebody there at Unidata) have Visual Studio 2012?
If so, can you try building this?

@WardF
Copy link
Member

WardF commented Jul 21, 2014

I'm afraid we don't. The best we have is Visual Studio 2010. I'm out if the office this morning but will give building it a shot when I get in to the office.

Sent from my iPhone

On Jul 21, 2014, at 9:23 AM, Rich Signell notifications@github.com wrote:

@WardF, do you (or somebody there at Unidata) have Visual Studio 2012?

If so, can you try building this?


Reply to this email directly or view it on GitHub.

@rsignell-usgs
Copy link

From what I've googled, it sounds like some VS 2012 solutions will build in VS 2010. I'll keep my fingers crossed. 😰

@sdebionne
Copy link
Author

Unfortunately I don't have VS2008 anymore. The simpliest option (obviously) could be to upgrade to Visual Studio 2012 while using " Visual Studio 2008 (v90)" as Platfrom Toolset (an option of the solution).
Be aware that the generation of the parsers from the bison files is not included. What I did is to hack the generated files... which is not a permanent solution. I could had a custom build step but that would require to have either bison in the path or to configure it somehow.
Since I posted this PR, Steve has made CMake the default build system. May be it would be best to merge this PR with CMake rather than to maintain a standalone VS solution...

@rsignell-usgs
Copy link

Ah, okay. Did you take this approach described by the VAPOR team?
http://sourceforge.net/p/vapor/git/ci/master/tree/lib/udunits2/README.txt
Any differences?

@CLAassistant
Copy link

CLAassistant commented Jun 28, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants