← All tasks
cppArthurSonzogni/FTXUI #62Not a task: already works

CMakeLists.txt issue when git is not installed or master.zip from github is used

envgap__ArthurSonzogni__FTXUI-62

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
afd53e050803a3c0e9d812ae13ab1c5a4c526a34
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

ArthurSonzogni/FTXUI #62 · read the original issue
The supplied CMakeLists.txt fails if either git is not installed or the master.zip from github is used (and therefore the unpacked source does not contain a git repository).

Change the top to:

```

find_package(git QUIET)

if (git_FOUND)

  execute_process(

  COMMAND git rev-list --count HEAD

  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

  OUTPUT_VARIABLE git_version

  OUTPUT_STRIP_TRAILING_WHITESPACE

)

else()

  set(git_version 0)

endif()

```



Setting `git_version` to 0 may not be the best solution, but at least it works.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]