cmake-git-version-tracking icon indicating copy to clipboard operation
cmake-git-version-tracking copied to clipboard

Embed Git metadata in a C/C++ compatible static library using CMake (e.g. commit ID, author, date, and message).

Results 5 cmake-git-version-tracking issues
Sort by recently updated
recently updated
newest added

Printing git tag info is useful so we might add this also.

We use your code in a downstream project at https://gitlab.com/YottaDB/DBMS/YDBOcto. It has served us well. We had some problems, so I am looking at the upstream version in order to...

Add ``` include(FetchContent) ``` to section `Quickstart via FetchContent` of `README.md` for completeness. Otherwise user gets error: ``` CMake Error at CMakeLists.txt:12 (FetchContent_Declare): Unknown CMake command "FetchContent_Declare". ```

# Example ```cmake set(CPACK_PROPERTIES_FILE "${CMAKE_BINARY_DIR}/CPackProperties.local.cmake") include(CPack) file(WRITE "${CPACK_PROPERTIES_FILE}" "\ include(${GIT_WATCHER_OUTPUT_PATH}) set(CPACK_PACKAGE_FILE_NAME \"\") list(APPEND CPACK_PACKAGE_FILE_NAME \"${CMAKE_PROJECT_NAME}\") list(APPEND CPACK_PACKAGE_FILE_NAME \"${CMAKE_PROJECT_VERSION}\") list(APPEND CPACK_PACKAGE_FILE_NAME \"\$\{GIT_DESCRIBE\}\") string(REPLACE \";\" \"-\" CPACK_PACKAGE_FILE_NAME \"\$\{CPACK_PACKAGE_FILE_NAME\}\") ") ``` ```shell CPack:...

-DCMAKE_AR=llvm-ar -DCMAKE_C_FLAGS="-flto=thin" -DCMAKE_...=... ... ``` [ 2%] Linking C static library libcmake_git_version_tracking.a /usr/bin/ar: invalid option -- 'e' Usage: /usr/bin/ar [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin ] [member-name] [count] archive-file file... /usr/bin/ar -M...