Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-08-22 16:24:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-22 16:24:14 +0400
commit817273931a42f807809a9d0f000564e2bd38dfb8 (patch)
tree7abf5e7b8710088a7b9000809124b1bddf3cba00 /source/creator
parent5394cabe244bea5c01f03bcf9511fd0a54738a67 (diff)
buildinfo is now quoted from the build systems, avoids stripping quotes on startup.
tested with linux/cmake linux/scons windows/cmake/mingw windows/cmake/msvc
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/CMakeLists.txt3
-rw-r--r--source/creator/buildinfo.c24
-rw-r--r--source/creator/creator.c26
3 files changed, 10 insertions, 43 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 43fec85b5bf..129ddca8c38 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -25,9 +25,6 @@
#
# ***** END GPL LICENSE BLOCK *****
-# So BUILDINFO and BLENDERPATH strings are automatically quoted
-cmake_policy(SET CMP0005 NEW)
-
setup_libdirs()
blender_include_dirs(
diff --git a/source/creator/buildinfo.c b/source/creator/buildinfo.c
index 48a4352b11b..3853d6ca693 100644
--- a/source/creator/buildinfo.c
+++ b/source/creator/buildinfo.c
@@ -33,28 +33,24 @@
#ifdef WITH_BUILDINFO_HEADER
-#include "buildinfo.h"
+# include "buildinfo.h"
#endif
#ifdef BUILD_DATE
-/* copied from BLI_utildefines.h */
-#define STRINGIFY_ARG(x) #x
-#define STRINGIFY(x) STRINGIFY_ARG(x)
-
/* currently only these are defined in the header */
-char build_date[]= STRINGIFY(BUILD_DATE);
-char build_time[]= STRINGIFY(BUILD_TIME);
-char build_rev[]= STRINGIFY(BUILD_REV);
+char build_date[]= BUILD_DATE;
+char build_time[]= BUILD_TIME;
+char build_rev[]= BUILD_REV;
-char build_platform[]= STRINGIFY(BUILD_PLATFORM);
-char build_type[]= STRINGIFY(BUILD_TYPE);
+char build_platform[]= BUILD_PLATFORM;
+char build_type[]= BUILD_TYPE;
#ifdef BUILD_CFLAGS
-char build_cflags[]= STRINGIFY(BUILD_CFLAGS);
-char build_cxxflags[]= STRINGIFY(BUILD_CXXFLAGS);
-char build_linkflags[]= STRINGIFY(BUILD_LINKFLAGS);
-char build_system[]= STRINGIFY(BUILD_SYSTEM);
+char build_cflags[]= BUILD_CFLAGS;
+char build_cxxflags[]= BUILD_CXXFLAGS;
+char build_linkflags[]= BUILD_LINKFLAGS;
+char build_system[]= BUILD_SYSTEM;
#else
char build_cflags[]= "unmaintained buildsystem alert!";
char build_cxxflags[]= "unmaintained buildsystem alert!";
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 36209dbda78..6aa1773be5a 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -182,20 +182,6 @@ static void blender_esc(int sig)
}
#endif
-/* buildinfo can have quotes */
-#ifdef BUILD_DATE
-static void strip_quotes(char *str)
-{
- if(str[0] == '"') {
- int len= strlen(str) - 1;
- memmove(str, str+1, len);
- if(str[len-1] == '"') {
- str[len-1]= '\0';
- }
- }
-}
-#endif
-
static int print_version(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
{
printf (BLEND_VERSION_STRING_FMT);
@@ -1181,18 +1167,6 @@ int main(int argc, const char **argv)
// need this.
BLI_where_am_i(bprogname, sizeof(bprogname), argv[0]);
-
-#ifdef BUILD_DATE
- strip_quotes(build_date);
- strip_quotes(build_time);
- strip_quotes(build_rev);
- strip_quotes(build_platform);
- strip_quotes(build_type);
- strip_quotes(build_cflags);
- strip_quotes(build_cxxflags);
- strip_quotes(build_linkflags);
- strip_quotes(build_system);
-#endif
BLI_threadapi_init();