Skip to content

cmake configuration for mingw-w64 #2103

Closed
mjwoods wants to merge 5 commits intoUnidata:mainfrom
mjwoods:mingw-w64-cmake
Closed

cmake configuration for mingw-w64 #2103
mjwoods wants to merge 5 commits intoUnidata:mainfrom
mjwoods:mingw-w64-cmake

Conversation

@mjwoods
Copy link
Copy Markdown
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
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.

1 participant