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
path: root/source
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2010-10-19 09:00:36 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2010-10-19 09:00:36 +0400
commit2a89fb887e6e9cc50a30ec67fb9cb3e8b06a59cd (patch)
treea3a35446f4b473bbe3d63df11945344f329d4803 /source
parent42d4e93733f563704456fed879b5f29b042d099f (diff)
* Enable compile and link flags to build info also on Windows and in SCons.
* Added build_system SCons or CMake * Write the new build info also to system-info.txt
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/intern/bpy_app.c4
-rw-r--r--source/creator/CMakeLists.txt10
-rw-r--r--source/creator/buildinfo.c2
-rw-r--r--source/creator/creator.c3
4 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c
index 39494678a12..b7a277c76b0 100644
--- a/source/blender/python/intern/bpy_app.c
+++ b/source/blender/python/intern/bpy_app.c
@@ -42,6 +42,7 @@ extern char build_type[];
extern char build_cflags[];
extern char build_cxxflags[];
extern char build_linkflags[];
+extern char build_system[];
#endif
static PyTypeObject BlenderAppType;
@@ -61,6 +62,7 @@ static PyStructSequence_Field app_info_fields[] = {
{"build_cflags", ""},
{"build_cxxflags", ""},
{"build_linkflags", ""},
+ {"build_system", ""},
{0}
};
@@ -105,6 +107,7 @@ static PyObject *make_app_info(void)
SetStrItem(build_cflags);
SetStrItem(build_cxxflags);
SetStrItem(build_linkflags);
+ SetStrItem(build_system);
#else
SetStrItem("Unknown");
SetStrItem("Unknown");
@@ -114,6 +117,7 @@ static PyObject *make_app_info(void)
SetStrItem("Unknown");
SetStrItem("Unknown");
SetStrItem("Unknown");
+ SetStrItem("Unknown");
#endif
#undef SetIntItem
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 65099761fad..27640cbc185 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -95,15 +95,19 @@ IF(WIN32)
ENDIF(WIN32)
IF(WITH_BUILDINFO)
+ STRING(REPLACE " " "\ " BUILDINFO_CFLAGS ${CMAKE_C_FLAGS})
+ STRING(REPLACE " " "\ " BUILDINFO_CXXFLAGS ${CMAKE_CXX_FLAGS})
+ STRING(REPLACE " " "\ " BUILDINFO_LINKFLAGS ${PLATFORM_LINKFLAGS})
ADD_DEFINITIONS(
-DBUILD_DATE="${BUILD_DATE}"
-DBUILD_TIME="${BUILD_TIME}"
-DBUILD_REV="${BUILD_REV}"
-DBUILD_PLATFORM="${CMAKE_SYSTEM_NAME}"
-DBUILD_TYPE="${CMAKE_BUILD_TYPE}"
- -DBUILD_CFLAGS="${CMAKE_C_FLAGS}"
- -DBUILD_CXXFLAGS="${CMAKE_CXX_FLAGS}"
- -DBUILD_LINKFLAGS="${PLATFORM_LINKFLAGS}"
+ -DBUILD_CFLAGS="${BUILDINFO_CFLAGS}"
+ -DBUILD_CXXFLAGS="${BUILDINFO_CXXFLAGS}"
+ -DBUILD_LINKFLAGS="${BUILDINFO_LINKFLAGS}"
+ -DBUILD_SYSTEM="CMake"
)
LIST(APPEND EXESRC buildinfo.c)
diff --git a/source/creator/buildinfo.c b/source/creator/buildinfo.c
index cf6f5a11c45..2203a97aa91 100644
--- a/source/creator/buildinfo.c
+++ b/source/creator/buildinfo.c
@@ -40,10 +40,12 @@ char build_type[]= STRINGIFY(BUILD_TYPE);
char build_cflags[]= STRINGIFY(BUILD_CFLAGS);
char build_cxxflags[]= STRINGIFY(BUILD_CXXFLAGS);
char build_linkflags[]= STRINGIFY(BUILD_LINKFLAGS);
+char build_system[]= STRINGIFY(BUILD_SYSTEM);
#else
char build_cflags[]= "unmaintained buildsystem alert!";
char build_cxxflags[]= "unmaintained buildsystem alert!";
char build_linkflags[]= "unmaintained buildsystem alert!";
+char build_system[]= "unmaintained buildsystem alert!";
#endif
#endif // BUILD_DATE
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 117efe6bba6..ed2f671a161 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -121,6 +121,7 @@ extern char build_type[];
extern char build_cflags[];
extern char build_cxxflags[];
extern char build_linkflags[];
+extern char build_system[];
#endif
/* Local Function prototypes */
@@ -190,6 +191,7 @@ static int print_version(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(dat
printf ("\tbuild c flags: %s\n", build_cflags);
printf ("\tbuild c++ flags: %s\n", build_cxxflags);
printf ("\tbuild link flags: %s\n", build_linkflags);
+ printf ("\tbuild system: %s\n", build_system);
#endif
exit(0);
@@ -1054,6 +1056,7 @@ int main(int argc, char **argv)
strip_quotes(build_cflags);
strip_quotes(build_cxxflags);
strip_quotes(build_linkflags);
+ strip_quotes(build_system);
#endif
BLI_threadapi_init();