New CMake build option to avoid version conflicts : CACHE_NAME_SUFFIX By default, append the latesttag value, but the developper may override it by specifying -DCACHE_NAME_SUFFIX:STRING=MySuffix in the cmake command line

With this new mechanism, the cache name will then be RawTherapee3.0, RawTherapee3.1, etc... The cache is now located in %LOCALAPPDATA% on Windows

Options.xxx template files has also been reduced to essential values, other ones are set in options.cc
This commit is contained in:
Hombre
2011-05-22 19:24:25 +02:00
parent 33c8254b87
commit 25463094a6
12 changed files with 134 additions and 325 deletions

View File

@@ -19,6 +19,9 @@ execute_process(COMMAND ${HG_CMD} -R ${SRC_DIR} branch OUTPUT_VARIABLE HG_BRANCH
execute_process(COMMAND ${HG_CMD} parents --template={latesttag}.{latesttagdistance} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${HG_CMD} parents --template={node|short} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_CHANGESET OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${HG_CMD} parents --template={latesttagdistance} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE HG_TAGDISTANCE OUTPUT_STRIP_TRAILING_WHITESPACE)
if (CACHE_NAME_SUFFIX STREQUAL "")
execute_process(COMMAND ${HG_CMD} parents --template={latesttag} WORKING_DIRECTORY ${SRC_DIR} OUTPUT_VARIABLE CACHE_NAME_SUFFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
endif ()
# build version.h from template
configure_file (${SRC_DIR}/rtgui/version.h.in ${SRC_DIR}/rtgui/version.h)