aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-11-09 13:54:43 -0500
committerJustin M. Keyes <justinkz@gmail.com>2014-11-09 13:54:43 -0500
commit8a0074d9b8da6112bb5e0f200f4bd17ef192bf9d (patch)
tree9895142115c0254b30c2bc41dcb978f529490d9d /src
parente9ac693bcde8e09e943b1e4a0e8a534c813501b8 (diff)
parent176930fa56bff3668d434779972ceb29d41d9bc7 (diff)
downloadrneovim-8a0074d9b8da6112bb5e0f200f4bd17ef192bf9d.tar.gz
rneovim-8a0074d9b8da6112bb5e0f200f4bd17ef192bf9d.tar.bz2
rneovim-8a0074d9b8da6112bb5e0f200f4bd17ef192bf9d.zip
Merge pull request #1403 from fwalch/version-flags
version: Add compilation info.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/CMakeLists.txt4
-rw-r--r--src/nvim/version.c8
-rw-r--r--src/nvim/version_defs.h12
3 files changed, 15 insertions, 9 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 4e0819cc0e..b06b4fa547 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -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")
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 4d81cc86bf..137f85bb2b 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -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
diff --git a/src/nvim/version_defs.h b/src/nvim/version_defs.h
index d8e1b4ea82..0ba6143632 100644
--- a/src/nvim/version_defs.h
+++ b/src/nvim/version_defs.h
@@ -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)