CMakeLists.txt: Set CMAKE_LINK_DEPENDS_NO_SHARED=ON.

This tells CMake to not re-link executables if a shared library's
implementation has changed but its headers haven't changed.

Should improve build performance when modifying a .cpp file in
libromdata, since it won't have to re-link all of the UI frontends
and unit tests.
This commit is contained in:
David Korth 2023-02-24 23:53:10 -05:00
parent 0ff8b7dafc
commit f8a291ca96

View File

@ -43,6 +43,10 @@ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" CACHE INTERNAL "Put
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" CACHE INTERNAL "Put all libraries in a single directory.")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" CACHE INTERNAL "Put all archives in a single directory.")
# Don't re-link executables if a shared library's implementation has
# changed but its headers haven't changed.
SET(CMAKE_LINK_DEPENDS_NO_SHARED ON)
# Enable testing.
# TODO: INCLUDE(CTest) for more advanced testing after
# enough tests are added.