ifeq ($(COMP),gcc)
comp=gcc
CXX=g++
- CXXFLAGS += -pedantic -Wextra -Wshadow
+ CXXFLAGS += -pedantic -Wextra
- ifeq ($(arch),$(filter $(arch),armv7 armv8))
+ ifeq ($(arch),$(filter $(arch),armv7 armv8 riscv64))
ifeq ($(OS),Android)
CXXFLAGS += -m$(bits)
LDFLAGS += -m$(bits)
} // namespace
- /// engine_info() returns the full name of the current Stockfish version. This
- /// will be either "Stockfish <Tag> DD-MM-YY" (where DD-MM-YY is the date when
- /// the program was compiled) or "Stockfish <Version>", depending on whether
- /// Version is empty.
+ /// engine_info() returns the full name of the current Stockfish version.
+ /// For local dev compiles we try to append the commit sha and commit date
+ /// from git if that fails only the local compilation date is set and "nogit" is specified:
+ /// Stockfish dev-YYYYMMDD-SHA
+ /// or
+ /// Stockfish dev-YYYYMMDD-nogit
+ ///
+ /// For releases (non dev builds) we only include the version number:
+ /// Stockfish version
string engine_info(bool to_uci) {
+ stringstream ss;
+ ss << "Stockfish " << version << setfill('0');
- const string months("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec");
- string month, day, year;
- stringstream ss, date(__DATE__); // From compiler, format is "Sep 21 2008"
-
- ss << "Stockfish " << Version << setfill('0');
-
- if (Version.empty())
+ if (version == "dev")
{
+ ss << "-";
+ #ifdef GIT_DATE
+ ss << GIT_DATE;
+ #else
+ const string months("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec");
+ string month, day, year;
+ stringstream date(__DATE__); // From compiler, format is "Sep 21 2008"
+
date >> month >> day >> year;
- ss << setw(2) << day << setw(2) << (1 + months.find(month) / 4) << year.substr(2);
+ ss << year << setw(2) << setfill('0') << (1 + months.find(month) / 4) << setw(2) << setfill('0') << day;
+ #endif
+
- ss << "-";
-
- #ifdef GIT_SHA
- ss << GIT_SHA;
- #else
- ss << "nogit";
- #endif
+ ss << "-asn";
}
ss << (to_uci ? "\nid author ": " by ")