-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fixes for Windows #1874
Merged
Merged
Fixes for Windows #1874
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Argument must be representable as `unsigned char`, so must `static_cast` argument
Workaround for name resolution bug in MSVC
This is a BSD extension in GNU's libc
Also conditionally include strings.h
Also make sure to catch them by const-ref
Can't set environment variable and run command in single process
bendudson
previously approved these changes
Jan 7, 2020
* next: (32 commits) Ignore file copied by configure Fix fmt include path not getting expanded correctly Add option to use external fmt instead of bundled version Install fmt from subdirectory correctly Fix Chinese translated strings Fixes for locale DE Add breaking change entry to changelog Add redundant out-of-line definitions for static Factory members Use fmt's positional arguments to avoid repeating variable Apply fmt fixes to i18n Apply fmt fixes to remaining tests and examples Use fmt for other printf formatting in bout++.cxx Use fmt to format timestamp Fix uses of output to use fmt formatting Use fmt in Output Fix out-of-line definition required for static member Fix uses of toString().c_str() with formatting Fix all BoutException calls in library Free messages from backtrace_symbols Use fmt in BoutException ...
bendudson
approved these changes
Jan 9, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Necessary fixes to compile on Windows, plus fixes for the noisiest warnings.
The unit tests run and pass, but the integrated tests need a bit of faff to run as tests:
./runtest
doesn't work as Windows can't tell what the filetype is. The ones written in Python can be run manually likepython.exe runtest
, but I had to use Anaconda to set up the Python environment and I've not managed to convince Visual Studio to use that to run the tests.test-solver
andtest-snb
can be run just as the executables, so they work fine.I've replaced
print("Making such and such test"); shell("make > make.log")
with a helper function,build_and_log("such and such test")
. This is a no-op for Windows becausemake
likely doesn't exist, and besides, CMake should've built it already.I also had to replace
shell("./test_command")
withlaunch("./test_command", nproc=1, mthread=1)
in a few tests, because while Windows needs the.exe
extension but MPI doesn't for some reason.At some point I need to set up CI for Windows, but this is very much a "nice to have", and not something I'm expecting us to put a lot of effort into supporting.
Bug fixes:
DEPRECATED
std::bind
isspace
needs to be called withint
but representable asunsigned char
: some casting requiredUNUSED
andMAYBE_UNUSED
CMakeLists.txt
was always requiredBoutInitialise
strcasecmp
and the BSDfinite(double)
(latter is BSD but in glibc for some reason -- C++ standard isstd::isfinite
)MACRO_FOR_EACH
by using an intermediateBOUT_EXPAND
macro that just expands its argumentDatafile
copy/move constructors missing some members -- notably the move ctor was missing themesh
member. I think oncefmt
goes in, making this= default
should be sufficientboututils.launch
Warning fixes:
size_t
toint
) in ubiquitous headers