diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2010-10-19 09:00:36 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2010-10-19 09:00:36 +0400 |
commit | 2a89fb887e6e9cc50a30ec67fb9cb3e8b06a59cd (patch) | |
tree | a3a35446f4b473bbe3d63df11945344f329d4803 /source/creator | |
parent | 42d4e93733f563704456fed879b5f29b042d099f (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/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 10 | ||||
-rw-r--r-- | source/creator/buildinfo.c | 2 | ||||
-rw-r--r-- | source/creator/creator.c | 3 |
3 files changed, 12 insertions, 3 deletions
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(); |