diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-18 16:56:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-18 16:56:14 +0400 |
commit | 799fc68234bbb8731439b8ecf3f782f69b11795c (patch) | |
tree | 4bfffa1e9431d695275b80af7713421f80842d95 /source/creator | |
parent | 6d0d688943b6f27c8069cd6e774322a7e1ee642f (diff) |
cflags, cxxflags & linkflags in buildinfo.
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 3 | ||||
-rw-r--r-- | source/creator/buildinfo.c | 11 | ||||
-rw-r--r-- | source/creator/creator.c | 9 |
3 files changed, 23 insertions, 0 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index f2ea4d3dc75..65099761fad 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -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) diff --git a/source/creator/buildinfo.c b/source/creator/buildinfo.c index a14cb94b859..cf6f5a11c45 100644 --- a/source/creator/buildinfo.c +++ b/source/creator/buildinfo.c @@ -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 diff --git a/source/creator/creator.c b/source/creator/creator.c index 26835eb28da..fce71edcced 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -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(); |