Skip to content

Commit

Permalink
Fix macro issue with multiple arguments
Browse files Browse the repository at this point in the history
Modified the `DPMD_CVT_STR` macro to handle multiple arguments by using `__VA_ARGS__`. This resolves the error caused by commas in the branch name during compilation.

This commit (including the above message) is entirely generated by ChatGPT 3.5.

Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz authored Nov 28, 2023
1 parent b4bb3a9 commit 9a55f5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/lmp/deepmd_version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define DEEPMD_ROOT @CMAKE_INSTALL_PREFIX@
#define TensorFlow_INCLUDE_DIRS @TensorFlow_INCLUDE_DIRS@
#define TensorFlow_LIBRARY @TensorFlow_LIBRARY@
#define DPMD_CVT_STR(x) #x
#define DPMD_CVT_STR(...) #__VA_ARGS__
#define DPMD_CVT_ASSTR(X) DPMD_CVT_STR(X)
#define STR_GIT_SUMM DPMD_CVT_ASSTR(GIT_SUMM)
#define STR_GIT_HASH DPMD_CVT_ASSTR(GIT_HASH)
Expand Down

0 comments on commit 9a55f5d

Please sign in to comment.