aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2006-01-29 13:51:46 +0000
committerAlexander Neundorf <neundorf@kde.org>2006-01-29 13:51:46 +0000
commit773bcd10a8e1f8ebc9cb64bb0db91f86f745085e (patch)
tree6bad6484c97ef1be17ed62cf8bc3cef3370542bd
parente8fe31826d1c34f9ffc5809cbb540eebf1f085a2 (diff)
downloadextra-cmake-modules-773bcd10a8e1f8ebc9cb64bb0db91f86f745085e.tar.gz
extra-cmake-modules-773bcd10a8e1f8ebc9cb64bb0db91f86f745085e.tar.bz2
also write a log file SystemInfo.txt
Alex svn path=/trunk/KDE/kdelibs/; revision=503519
-rw-r--r--systeminfo/CMakeLists.txt32
1 files changed, 19 insertions, 13 deletions
diff --git a/systeminfo/CMakeLists.txt b/systeminfo/CMakeLists.txt
index a134ee78..d78e37f3 100644
--- a/systeminfo/CMakeLists.txt
+++ b/systeminfo/CMakeLists.txt
@@ -1,34 +1,40 @@
+macro(LOG line)
+ message(STATUS ${line})
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/SystemInfo.txt "${line}\n")
+endmacro(LOG line)
+
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/SystemInfo.txt "CMake system information: \n")
message(STATUS "-----------------------------------")
message(STATUS "Printing system information: ")
message(STATUS "-----------------------------------")
-message(STATUS "C compiler: ${CMAKE_C_COMPILER}")
-message(STATUS "CXX compiler: ${CMAKE_CXX_COMPILER}")
-message(STATUS "C compiler is gcc: ${CMAKE_COMPILER_IS_GNUCC}")
-message(STATUS "CXX compiler is g++: ${CMAKE_COMPILER_IS_GNUCXX}")
-message(STATUS "System: ${CMAKE_SYSTEM}")
-message(STATUS "System name: ${CMAKE_SYSTEM_NAME}")
-message(STATUS "System version: ${CMAKE_SYSTEM_VERSION}")
+
+log("C compiler: ${CMAKE_C_COMPILER}")
+log("CXX compiler: ${CMAKE_CXX_COMPILER}")
+log("C compiler is gcc: ${CMAKE_COMPILER_IS_GNUCC}")
+log("CXX compiler is g++: ${CMAKE_COMPILER_IS_GNUCXX}")
+log("System: ${CMAKE_SYSTEM}")
+log("System name: ${CMAKE_SYSTEM_NAME}")
+log("System version: ${CMAKE_SYSTEM_VERSION}")
if(UNIX)
- message(STATUS "This is some kind of UNIX environment")
+ log("This is some kind of UNIX environment")
endif(UNIX)
if(WIN32)
- message(STATUS "This is Windows")
+ log("This is Windows")
endif(WIN32)
if(APPLE)
- message(STATUS "This is an Apple")
+ log("This is an Apple")
endif(APPLE)
if(MINGW)
- message(STATUS "This is MinGW")
+ log("This is MinGW")
endif(MINGW)
if(CYGWIN)
- message(STATUS "This is Cygwin")
+ log("This is Cygwin")
endif(CYGWIN)
-
message(STATUS "-----------------------------------")