version: Add compilation info.

This commit is contained in:
Florian Walch
2014-11-09 13:52:15 +01:00
parent dcccc1a50d
commit 176930fa56
6 changed files with 94 additions and 10 deletions

View File

@@ -89,8 +89,8 @@ get_directory_property(gen_includes INCLUDE_DIRECTORIES)
foreach(gen_include ${gen_includes})
set(gen_cflags "${gen_cflags} -I${gen_include}")
endforeach()
string(TOUPPER "${CMAKE_BUILD_TYPE}" _build_type)
set(gen_cflags "${gen_cflags} ${CMAKE_C_FLAGS_${_build_type}} ${CMAKE_C_FLAGS}")
string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type)
set(gen_cflags "${gen_cflags} ${CMAKE_C_FLAGS_${build_type}} ${CMAKE_C_FLAGS}")
foreach(sfile ${NEOVIM_SOURCES}
"${PROJECT_SOURCE_DIR}/src/nvim/regexp_nfa.c")

View File

@@ -21,6 +21,8 @@
char *Version = VIM_VERSION_SHORT;
char *longVersion = NVIM_VERSION_LONG " (compiled " __DATE__ " " __TIME__ ")";
char *version_commit = "Commit: " NVIM_VERSION_COMMIT;
char *version_buildtype = "Build type: " NVIM_VERSION_BUILD_TYPE;
char *version_cflags = "Compilation: " NVIM_VERSION_CFLAGS;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "version.c.generated.h"
@@ -778,6 +780,8 @@ void list_version(void)
// internal variables in eval.c!
MSG(longVersion);
MSG(version_commit);
MSG(version_buildtype);
MSG(version_cflags);
// Print the list of extra patch descriptions if there is at least one.
char *s = "";
@@ -857,10 +861,6 @@ void list_version(void)
version_msg("\"\n");
}
#endif // ifdef HAVE_PATHDEF
#ifdef DEBUG
version_msg("\n");
version_msg(_(" DEBUG BUILD"));
#endif // ifdef DEBUG
}
/// Output a string for the version message. If it's going to wrap, output a

View File

@@ -22,13 +22,19 @@
#define NVIM_VERSION_PATCH 0
#endif
#ifndef NVIM_VERSION_PRERELEASE
#define NVIM_VERSION_PRERELEASE
#define NVIM_VERSION_PRERELEASE "?"
#endif
#ifndef NVIM_VERSION_BUILD
#define NVIM_VERSION_BUILD
#define NVIM_VERSION_BUILD "?"
#endif
#ifndef NVIM_VERSION_COMMIT
#define NVIM_VERSION_COMMIT
#define NVIM_VERSION_COMMIT "?"
#endif
#ifndef NVIM_VERSION_CFLAGS
#define NVIM_VERSION_CFLAGS "?"
#endif
#ifndef NVIM_VERSION_BUILD_TYPE
#define NVIM_VERSION_BUILD_TYPE "?"
#endif
// for the startup-screen
#define NVIM_VERSION_MEDIUM STR(NVIM_VERSION_MAJOR) "." STR(NVIM_VERSION_MINOR)