~ubuntu-branches/ubuntu/wily/openms/wily

« back to all changes in this revision

Viewing changes to cmake/svnversion.cmake

  • Committer: Package Import Robot
  • Author(s): Filippo Rusconi
  • Date: 2013-12-20 11:30:16 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20131220113016-wre5g9bteeheq6he
Tags: 1.11.1-3
* remove version number from libbost development package names;
* ensure that AUTHORS is correctly shipped in all packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
if (OPENMS_HAS_SVNVERSION)
2
 
        execute_process(COMMAND ${SVNVERSION_EXECUTABLE} -n ${SOURCE_DIR} OUTPUT_VARIABLE SVNVERSION)
3
 
endif()
4
 
if(NOT SVNVERSION)
5
 
        set(SVNVERSION "unknown")
6
 
endif()
7
 
file(WRITE ${SVN_REVISION_FILE}.tmp "// generated by the build system! do not edit this manually\n#define OPENMS_SVN_REVISION \"${SVNVERSION}\"\n")
8
 
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SVN_REVISION_FILE}.tmp ${SVN_REVISION_FILE})
9
 
file(REMOVE ${SVN_REVISION_FILE}.tmp)
 
1
if (ENABLE_SVN)
 
2
        if (OPENMS_HAS_SVNVERSION)
 
3
                execute_process(COMMAND ${SVNVERSION_EXECUTABLE} -n ${SOURCE_DIR} OUTPUT_VARIABLE SVNVERSION)
 
4
        endif()
 
5
        if(NOT SVNVERSION)
 
6
                set(SVNVERSION "unknown")
 
7
        endif()
 
8
        file(WRITE ${SVN_REVISION_FILE}.tmp "// generated by the build system! do not edit this manually\n#define OPENMS_SVN_REVISION \"${SVNVERSION}\"\n")
 
9
        execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SVN_REVISION_FILE}.tmp ${SVN_REVISION_FILE})
 
10
        file(REMOVE ${SVN_REVISION_FILE}.tmp)
 
11
else()
 
12
        # write the file once:
 
13
        if (NOT EXISTS ${SVN_REVISION_FILE})
 
14
                set(SVNVERSION "unknown")
 
15
                file(WRITE ${SVN_REVISION_FILE} "// generated by the build system! do not edit this manually\n#define OPENMS_SVN_REVISION \"${SVNVERSION}\"\n")
 
16
        endif()
 
17
endif()