Skip to content

Commit

Permalink
wrote manpage in c3c.1 and added manpage install to CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
goneal26 committed Oct 28, 2024
1 parent 0639659 commit 9c2caab
Show file tree
Hide file tree
Showing 2 changed files with 563 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,17 @@ endif()
install(TARGETS c3c DESTINATION bin)
install(DIRECTORY lib/ DESTINATION lib/c3)

# Man page install (OSX/Linux only)
set(MAN_PAGE_DIR "/usr/local/share/man/man1")
message(STATUS "installing man page to ${MAN_PAGE_DIR}")

if (NOT WIN32 AND EXISTS "${MAN_PAGE_DIR}")
install(FILES c3c.1 DESTINATION ${MAN_PAGE_DIR})
elseif (NOT WIN32)
# won't create MAN_PAGE_DIR if it doesn't already exist
message(WARNING "Man page directory ${MAN_PAGE_DIR} does not exist, skipping man page installation")
endif()

if (C3_WITH_LLVM AND DEFINED sanitizer_runtime_libraries)
add_custom_command(TARGET c3c POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E rm -rf -- $<TARGET_FILE_DIR:c3c>/c3c_rt
Expand Down
Loading

0 comments on commit 9c2caab

Please sign in to comment.