Skip to content

Commit

Permalink
cmake: Fix nix build
Browse files Browse the repository at this point in the history
Nix does the build in a hermetic environment. Git history is not
available during the build. This confuses cmake. Fix by removing the
explicit dependency on git history.

This should still work OK, as Version.cmake handles git shellout
failures gracefully.
  • Loading branch information
danobi committed Feb 27, 2024
1 parent 2b3cec1 commit 34ea04e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ endif()

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
DEPENDS ${PROJECT_SOURCE_DIR}/.git/index
COMMAND ${CMAKE_COMMAND}
-DVERSION_H_IN=${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
-DVERSION_H=${CMAKE_CURRENT_BINARY_DIR}/version.h
Expand Down

0 comments on commit 34ea04e

Please sign in to comment.