Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

cmake configuration for mingw-w64 #2103

Closed
wants to merge 5 commits into from

Conversation

mjwoods
Copy link
Contributor

@mjwoods mjwoods commented Sep 4, 2021

In the netcdf package for mingw-w64, a patch is applied to the CMakeLists.txt file. To improve visibility of the changes involved, I am submitting the patch for inclusion in the netcdf source distribution.

Here is the original patch from MINGW-packages.

I have removed the definitions for variables HAVE_WIN_TEMP and HAVE_WIN_SSCANF , which were used by other patches that are not required with the current netcdf master branch. I have also enabled the test for mkstemp, which is provided by the current mingw-w64 header files.

I have added the definition of preprocessor macro __USE_MINGW_ANSI_STDIO, which enables support for ANSI standard format specifiers in printf and related functions, so that tests of ncdump and ncgen do not fail with incorrectly formatted output.

I have also added a compiler flag (where supported) so that __FILE__ macros are converted to relative paths. Packages for mingw-w64 are required to be relocatable, and warnings are produced when building packages that refer to the absolute location of the build directory. The warnings are avoided by using relative paths in compiled objects. (Absolute paths in text files are replaced as part of the mingw-w64 package creation step).

@mjwoods mjwoods requested a review from WardF as a code owner September 4, 2021 06:35
@WardF WardF mentioned this pull request Mar 14, 2022
@WardF WardF closed this in #2246 Mar 14, 2022
WardF added a commit that referenced this pull request Mar 14, 2022
@mjwoods mjwoods deleted the mingw-w64-cmake branch April 13, 2022 09:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant