Skip to content

Commit

Permalink
Update CMake documentation (#6535)
Browse files Browse the repository at this point in the history
* Allow third parties to externally override SOVERSION

Debian and other third-party packagers might need or want
to patch our sources for a variety of reasons. In those
cases, they might also need to override the SOVERSION.

See here for a practical example:

https://salsa.debian.org/pkg-llvm-team/halide/-/blob/f881de70cd83095053e13047b63f61faf6bc7a36/debian/patches/0006-Fixup-libhalide-version-soversion-for-debian-package.patch

* Update CMake documentation.

* Fix typo

* Add link to ToC

(cherry picked from commit 95737be)
  • Loading branch information
alexreinking committed Jan 6, 2022
1 parent 7c718bc commit a4542d7
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 55 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ endif()

# Build Halide with ccache if the package is present
option(Halide_CCACHE_BUILD "Set to ON for a ccache enabled build" OFF)
mark_as_advanced(Halide_CCACHE_BUILD)
if (Halide_CCACHE_BUILD)
find_program(CCACHE_PROGRAM ccache)
if (CCACHE_PROGRAM)
Expand All @@ -58,6 +59,7 @@ if (Halide_CCACHE_BUILD)
# if issues occur (but we don't use any of the time macros so should be irrelevant).
set(Halide_CCACHE_PARAMS CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines
CACHE STRING "Parameters to pass through to ccache")
mark_as_advanced(Halide_CCACHE_PARAMS)
set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${Halide_CCACHE_PARAMS} ${CCACHE_PROGRAM})
set(CMAKE_CXX_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env ${Halide_CCACHE_PARAMS} ${CCACHE_PROGRAM})
message(STATUS "Enabling ccache usage for building.")
Expand Down
Loading

0 comments on commit a4542d7

Please sign in to comment.