mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-30 03:28:24 -07:00
Add CMake project, GCC support (#540)
This is extract from #211 that enables compilation with GCC. With #211 now in the state of bitrot, I would rather try approaching it in smaller steps that can be hopefully merged quicker, even if it does not provide full support for all the features #211 provided. This will _compile_ correctly with my (@janisozaur) GCC, but clang is more picky about flexible array members and refuses to compile it yet. I will extract remaining parts of #211 in future PRs. I marked @fwcd as author, as he did most of the work in #211.
This commit is contained in:
parent
98f1da2e9d
commit
fe30c7cabc
19 changed files with 151 additions and 50 deletions
|
@ -12,6 +12,10 @@ using namespace CalcEngine;
|
|||
static constexpr size_t MAX_HISTORY_ITEMS = 20;
|
||||
static constexpr size_t SERIALIZED_NUMBER_MINSIZE = 3;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define __pragma(x)
|
||||
#endif
|
||||
|
||||
// Converts Memory Command enum value to unsigned char,
|
||||
// while ignoring Warning C4309: 'conversion' : truncation of constant value
|
||||
#define MEMORY_COMMAND_TO_UNSIGNED_CHAR(c) __pragma(warning(push)) __pragma(warning(disable : 4309)) static_cast<unsigned char>(c) __pragma(warning(pop))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue