Adding Steve Herell's CMakeLists.txt patch

This commit is contained in:
Hombre
2011-02-13 23:45:21 +01:00
parent ed39938e55
commit 854e1bebda
2 changed files with 16 additions and 6 deletions

View File

@@ -7,8 +7,8 @@ set (OUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/AboutThisBuild.txt")
set (VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/rtgui/version.h")
add_custom_target (AboutFile ALL
COMMAND for /F \"tokens=*\" %%i in \('hg branch'\) do echo Branch: %%i >${OUT_FILE}
COMMAND hg parents --template=\"Version: {latesttag}.{latesttagdistance}\\nChangset: {node|short}\\n\" >>${OUT_FILE}
COMMAND for /F \"tokens=*\" %%i in \('hg -R \"${CMAKE_CURRENT_SOURCE_DIR}\" branch'\) do echo Branch: %%i >${OUT_FILE}
COMMAND hg -R \"${CMAKE_CURRENT_SOURCE_DIR}\" parents --template=\"Version: {latesttag}.{latesttagdistance}\\nChangset: {node|short}\\n\" >>${OUT_FILE}
COMMAND for /F \"tokens=*\" %%i in \('gcc -dumpversion'\) do echo Compiler: GCC%%i >>${OUT_FILE}
COMMAND \(echo Processor: ${PROC_LABEL}\) >>${OUT_FILE}
COMMAND \(echo Bit depth: ${PROC_BIT_DEPTH}\) >>${OUT_FILE}
@@ -18,6 +18,6 @@ add_custom_target (AboutFile ALL
COMMAND (if ${OPTION_OMP}==ON \(echo OpenMP support: Yes\) else \(echo OpenMP support: No\)) >>${OUT_FILE}
COMMAND (if ${WITH_MYFILE_MMAP}==ON \(echo MMAP support: Yes\) else \(echo MMAP support: No\)) >>${OUT_FILE}
COMMAND (if ${WITH_RAWZOR}==ON \(echo Rawzor support: Yes\) else \(echo Rawzor support: No\)) >>${OUT_FILE}
COMMAND hg parents --template=\"// This file is automatically generated by the Makefile \; DO NOT EDIT!\\n// You can \(should\) also tell mercurial to ignore it.\\n\\n\#ifndef _VERSION_\\n\#define _VERSION_\\n\\n\#define VERSION \\"{latesttag}.{latesttagdistance}\\"\\n\#define TAGDISTANCE {latesttagdistance}\\n\\n\#endif\\n\" >${VERSION_FILE}
COMMAND hg -R \"${CMAKE_CURRENT_SOURCE_DIR}\" parents --template=\"// This file is automatically generated by the Makefile \; DO NOT EDIT!\\n// You can \(should\) also tell mercurial to ignore it.\\n\\n\#ifndef _VERSION_\\n\#define _VERSION_\\n\\n\#define VERSION \\"{latesttag}.{latesttagdistance}\\"\\n\#define TAGDISTANCE {latesttagdistance}\\n\\n\#endif\\n\" >${VERSION_FILE}
COMMENT "Creating the about file"
)