Skip to content

Commit 3ed70c6

Browse files
committedAug 8, 2018
buildinfo: Mark buildinfo.json as GENERATED file
1 parent a0c88f9 commit 3ed70c6

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed
 

‎CableBuildInfo.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function(cable_add_buildinfo_library)
5252

5353
add_custom_command(
5454
COMMENT "Updating ${name}:"
55-
OUTPUT ${source_file}
55+
OUTPUT ${source_file} ${output_dir}/buildinfo.json
5656
COMMAND ${CMAKE_COMMAND}
5757
-DOUTPUT_DIR=${output_dir}
5858
-DPROJECT_NAME=${_PROJECT_NAME}
@@ -67,6 +67,7 @@ function(cable_add_buildinfo_library)
6767
DEPENDS
6868
${cable_buildinfo_template_dir}/buildinfo.cmake
6969
${cable_buildinfo_template_dir}/buildinfo.c.in
70+
${cable_buildinfo_template_dir}/buildinfo.json.in
7071
${name}-git
7172
${output_dir}/gitinfo.txt
7273
)

‎buildinfo/buildinfo.json.in

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "@PROJECT_NAME@",
3-
"version": "@PROJECT_VERSION@",
4-
"is_prerelease": @PROJECT_VERSION_IS_PRERELEASE@,
5-
"commit": "@GIT_COMMIT_HASH@",
6-
"branch": "@GIT_BRANCH@",
7-
"repo": "@GIT_ORIGIN_URL@",
8-
"system_name": "@SYSTEM_NAME@",
9-
"system_processor": "@SYSTEM_PROCESSOR@"
2+
"name": "@PROJECT_NAME@",
3+
"version": "@PROJECT_VERSION@",
4+
"is_prerelease": @PROJECT_VERSION_IS_PRERELEASE@,
5+
"commit": "@GIT_COMMIT_HASH@",
6+
"branch": "@GIT_BRANCH@",
7+
"repo": "@GIT_ORIGIN_URL@",
8+
"system_name": "@SYSTEM_NAME@",
9+
"system_processor": "@SYSTEM_PROCESSOR@"
1010
}

0 commit comments

Comments
 (0)
Please sign in to comment.