Sha256: fb97ba7f494f854cb220d0e9245e0c4ea2d836e8787f2b3cf07e262494c77794

Contents?: true

Size: 1.28 KB

Versions: 16

Compression:

Stored size: 1.28 KB

Contents

# Taken from https://github.com/tarantool/tarantool

# Generate man pages of the project by using the POD header
# written in the tool source code. To use it - include this
# file in CMakeLists.txt and invoke
# pod2man(<podfile> <manfile> <section> <center>)
find_program(POD2MAN pod2man)

if(NOT POD2MAN)
    message(STATUS "Could not find pod2man - man pages disabled")
endif(NOT POD2MAN)

macro(pod2man PODFILE MANFILE SECTION OUTPATH CENTER)
    if(NOT EXISTS ${PODFILE})
        message(FATAL ERROR "Could not find pod file ${PODFILE} to generate man page")
    endif(NOT EXISTS ${PODFILE})

    if(POD2MAN)
        set(OUTPATH_NEW "${PROJECT_BINARY_DIR}/${OUTPATH}")

        add_custom_command(
            OUTPUT ${OUTPATH_NEW}/${MANFILE}.${SECTION}
            COMMAND ${POD2MAN} --section ${SECTION} --center ${CENTER}
                --release "\"\"" --name ${MANFILE} ${PODFILE}
                ${OUTPATH_NEW}/${MANFILE}.${SECTION}
        )
        set(MANPAGE_TARGET "man-${MANFILE}")
        add_custom_target(${MANPAGE_TARGET} ALL
            DEPENDS ${OUTPATH_NEW}/${MANFILE}.${SECTION}
        )
        install(
            FILES ${OUTPATH_NEW}/${MANFILE}.${SECTION}
            DESTINATION ${OUTPATH}/man${SECTION}
        )
    endif()
endmacro(pod2man PODFILE MANFILE SECTION OUTPATH CENTER)

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
facter-3.12.2.cfacter.20181217 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.12.1.cfacter.20181031 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.11.6.cfacter.20181031 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.12.1.cfacter.20181023 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.11.5.cfacter.20181022 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.12.0.cfacter.20181004 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.12.0.cfacter.20181001 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.12.0.cfacter.20180918 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.11.4.cfacter.20180821 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.11.3.cfacter.20180716 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.11.2.cfacter.20180612 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.9.6.cfacter.20180612 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.11.2.cfacter.20180606 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.9.6.cfacter.20180606 ext/facter/leatherman/cmake/pod2man.cmake
facter-3.11.0.cfacter.20180319 ext/facter/leatherman/cmake/pod2man.cmake
cfacter-3.11.0.rc.20180314 ext/facter/leatherman/cmake/pod2man.cmake