Skip to content

Commit 8104841

Browse files
authored
Fix version in DeePMDConfigVersion.cmake (#4577)
The double quotes end up as follows in `DeePMDConfigVersion.cmake`: ```cmake set(PACKAGE_VERSION "$<IF:?:"0.0.0">") ``` This result in the following warning: ``` CMake Error (dev) at /opt/cp2k-toolchain/install/deepmd-kit-3.0.1/lib/cmake/DeePMD/DeePMDConfigVersion.cmake:10: Syntax Warning in cmake code at column 30 Argument not separated from preceding token by whitespace. Call Stack (most recent call first): CMakeLists.txt:703 (find_package) This error is for project developers. Use -Wno-error=dev to suppress it. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved the project’s version handling to ensure that when no version is provided, a reliable default is used, resulting in more consistent and accurate version information for end-users. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 63c4772 commit 8104841

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ if(BUILD_CPP_IF
580580
set(version_file "${generated_dir}/${CMAKE_PROJECT_NAME}ConfigVersion.cmake")
581581
write_basic_package_version_file(
582582
${version_file}
583-
VERSION $<IF:${GIT_SUMM}?${GIT_SUMM}:"0.0.0">
583+
VERSION $<IF:${GIT_SUMM}?${GIT_SUMM}:0.0.0>
584584
COMPATIBILITY AnyNewerVersion)
585585
install(
586586
EXPORT ${targets_export_name}

0 commit comments

Comments
 (0)