Skip to content

Commit 2b95ca8

Browse files
statham-armpratlucas
authored andcommitted
Fix cmake syntax in generate_version_txt.cmake. (#96)
Commit 23f1d75 included `$(LLVM_TOOLCHAIN_C_LIBRARY)`, which isn't valid cmake syntax – to interpolate a cmake variable you have to use braces, not parentheses. This led to a mysterious error from git fatal: cannot change to 'rev-parse': No such file or directory because once `${base_library}` is set to something that doesn't make sense, `git -C ${${base_library}_SOURCE_DIR} rev-parse HEAD` substitutes nothing at all for the source directory, and the command collapses to just `git -C rev-parse` which indeed interprets `rev-parse` as the directory to change into.
1 parent 7f60fd9 commit 2b95ca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arm-software/embedded/cmake/generate_version_txt.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if(NOT (LLVM_TOOLCHAIN_C_LIBRARY STREQUAL llvmlibc)) # libc in a separate repo?
2121
if(LLVM_TOOLCHAIN_C_LIBRARY MATCHES "^newlib")
2222
set(base_library newlib)
2323
else()
24-
set(base_library $(LLVM_TOOLCHAIN_C_LIBRARY))
24+
set(base_library ${LLVM_TOOLCHAIN_C_LIBRARY})
2525
endif()
2626

2727
execute_process(

0 commit comments

Comments
 (0)