cflags, cxxflags & linkflags in buildinfo.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 18 Oct 2010 12:56:14 +0000 (12:56 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 18 Oct 2010 12:56:14 +0000 (12:56 +0000)
CMakeLists.txt
source/blender/python/intern/bpy_app.c
source/creator/CMakeLists.txt
source/creator/buildinfo.c
source/creator/creator.c

index 39dc85cc15aea15dccbe2b7b541e7ef2b2ba32db..39ef55f351f1232fb26cf75aa590e50d4927b90a 100644 (file)
@@ -923,7 +923,7 @@ IF((NOT WIN32) AND (NOT MSVC))
        SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG")
        SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DNDEBUG")
        SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DNDEBUG")
-ENDIF(NOT WIN32 AND NOT MSVC)
+ENDIF((NOT WIN32) AND (NOT MSVC))
 
 IF(CMAKE_COMPILER_IS_GNUCC)
        SET(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type")
index 46a3c93292bad68d987c7e8e6072e4f4aa837fb9..39494678a125fbdf753acfc054adbb422fe7d105 100644 (file)
@@ -39,6 +39,9 @@ extern char build_time[];
 extern char build_rev[];
 extern char build_platform[];
 extern char build_type[];
+extern char build_cflags[];
+extern char build_cxxflags[];
+extern char build_linkflags[];
 #endif
 
 static PyTypeObject BlenderAppType;
@@ -55,6 +58,9 @@ static PyStructSequence_Field app_info_fields[] = {
        {"build_revision", "The subversion revision this blender instance was built with"},
        {"build_platform", "The platform this blender instance was built for"},
        {"build_type", "The type of build (Release, Debug)"},
+       {"build_cflags", ""},
+       {"build_cxxflags", ""},
+       {"build_linkflags", ""},
        {0}
 };
 
@@ -96,12 +102,18 @@ static PyObject *make_app_info(void)
        SetStrItem(build_rev);
        SetStrItem(build_platform);
        SetStrItem(build_type);
+       SetStrItem(build_cflags);
+       SetStrItem(build_cxxflags);
+       SetStrItem(build_linkflags);
 #else
        SetStrItem("Unknown");
        SetStrItem("Unknown");
        SetStrItem("Unknown");
        SetStrItem("Unknown");
        SetStrItem("Unknown");
+       SetStrItem("Unknown");
+       SetStrItem("Unknown");
+       SetStrItem("Unknown");
 #endif
 
 #undef SetIntItem
index f2ea4d3dc7589169cc2a685e75bb5a7ae13c9283..65099761fada5cce02db53ca15f3a1edbd1e872d 100644 (file)
@@ -101,6 +101,9 @@ IF(WITH_BUILDINFO)
                -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}"
        )
 
        LIST(APPEND EXESRC buildinfo.c)
index a14cb94b859561c8f9aeceb233e1ccc88eeed2ab..cf6f5a11c45d94e98ed2829aa5f994c038140afc 100644 (file)
@@ -35,4 +35,15 @@ char build_time[]= STRINGIFY(BUILD_TIME);
 char build_rev[]= STRINGIFY(BUILD_REV);
 char build_platform[]= STRINGIFY(BUILD_PLATFORM);
 char build_type[]= STRINGIFY(BUILD_TYPE);
+
+#ifdef BUILD_CFLAGS
+char build_cflags[]= STRINGIFY(BUILD_CFLAGS);
+char build_cxxflags[]= STRINGIFY(BUILD_CXXFLAGS);
+char build_linkflags[]= STRINGIFY(BUILD_LINKFLAGS);
+#else
+char build_cflags[]= "unmaintained buildsystem alert!";
+char build_cxxflags[]= "unmaintained buildsystem alert!";
+char build_linkflags[]= "unmaintained buildsystem alert!";
 #endif
+
+#endif // BUILD_DATE
index 26835eb28da887bc274981af21b421affbcbeeee..fce71edcced20ac74efb46d402d45907958ded15 100644 (file)
@@ -118,6 +118,9 @@ extern char build_time[];
 extern char build_rev[];
 extern char build_platform[];
 extern char build_type[];
+extern char build_cflags[];
+extern char build_cxxflags[];
+extern char build_linkflags[];
 #endif
 
 /*     Local Function prototypes */
@@ -184,6 +187,9 @@ static int print_version(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(dat
        printf ("\tbuild revision: %s\n", build_rev);
        printf ("\tbuild platform: %s\n", build_platform);
        printf ("\tbuild type: %s\n", build_type);
+       printf ("\tbuild c flags: %s\n", build_cflags);
+       printf ("\tbuild c++ flags: %s\n", build_cxxflags);
+       printf ("\tbuild link flags: %s\n", build_linkflags);
 #endif
        exit(0);
 
@@ -1045,6 +1051,9 @@ int main(int argc, char **argv)
     strip_quotes(build_rev);
     strip_quotes(build_platform);
     strip_quotes(build_type);
+    strip_quotes(build_cflags);
+    strip_quotes(build_cxxflags);
+    strip_quotes(build_linkflags);
 #endif
 
        BLI_threadapi_init();