# Build ID

**URL:** https://discourse.cmake.org/t/build-id/354
**Category:** Usage
**Created:** [December 11, 2019, 8:09pm UTC](https://discourse.cmake.org/t/build-id/354 "2019-12-11T20:09:06Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Dixon](https://discourse.cmake.org/user_avatar/discourse.cmake.org/david_dixon/32/127_2.png) [@David\_Dixon](https://discourse.cmake.org/u/David_Dixon)
#### Post date: [December 11, 2019, 8:09pm UTC](https://discourse.cmake.org/t/build-id/354/1 "2019-12-11T20:09:06Z")

</div>

When running CI it would be great to post a link to the build on cdash. Is it possible to generate the link? If not, it seems like I just need the buildid e.g.:

```auto
https://mycdashserver.com/cdash/buildSummary.php?buildid=1234

```

Is it possible to query cdash for the buildid?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [December 11, 2019, 8:52pm UTC](https://discourse.cmake.org/t/build-id/354/2 "2019-12-11T20:52:25Z")

</div>

I remember some way was added to get this information, but can’t find it right now. @zackgalbreath

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [December 11, 2019, 8:56pm UTC](https://discourse.cmake.org/t/build-id/354/3 "2019-12-11T20:56:11Z")

</div>

Ah, there is `ctest_submit(BUILD_ID)` added in 3.15.

---

<div class="post-metadata">

### Author: ![David\_Dixon](https://discourse.cmake.org/user_avatar/discourse.cmake.org/david_dixon/32/127_2.png) [@David\_Dixon](https://discourse.cmake.org/u/David_Dixon)
#### Post date: [December 12, 2019, 4:39am UTC](https://discourse.cmake.org/t/build-id/354/4 "2019-12-12T04:39:46Z")

</div>

I am doing the following:

```auto
ctest_submit(PARTS Notes BUILD_ID build_id)

```

and build\_id is empty… bummer

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [December 12, 2019, 1:15pm UTC](https://discourse.cmake.org/t/build-id/354/5 "2019-12-12T13:15:56Z")

</div>

I think it needs to be on the first `ctest_submit`. I’m not sure off-hand, Zack should be able to help more when he gets a chance.

---

<div class="post-metadata">

### Author: ![David\_Dixon](https://discourse.cmake.org/user_avatar/discourse.cmake.org/david_dixon/32/127_2.png) [@David\_Dixon](https://discourse.cmake.org/u/David_Dixon)
#### Post date: [December 12, 2019, 2:18pm UTC](https://discourse.cmake.org/t/build-id/354/6 "2019-12-12T14:18:21Z")

</div>

@zackgalbreath any thoughts? I can’t seem to get anything meaningful from BUILD\_ID…

---

<div class="post-metadata">

### Author: ![David\_Dixon](https://discourse.cmake.org/user_avatar/discourse.cmake.org/david_dixon/32/127_2.png) [@David\_Dixon](https://discourse.cmake.org/u/David_Dixon)
#### Post date: [December 12, 2019, 3:33pm UTC](https://discourse.cmake.org/t/build-id/354/7 "2019-12-12T15:33:00Z")

</div>

Is it possible that the version of cdash I use is not compatible with this feature?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [December 12, 2019, 10:09pm UTC](https://discourse.cmake.org/t/build-id/354/8 "2019-12-12T22:09:51Z")

</div>

That is likely the problem.

---

<div class="post-metadata">

### Author: ![zackgalbreath](https://discourse.cmake.org/user_avatar/discourse.cmake.org/zackgalbreath/32/94_2.png) [@zackgalbreath](https://discourse.cmake.org/u/zackgalbreath)
#### Post date: [December 13, 2019, 2:44pm UTC](https://discourse.cmake.org/t/build-id/354/9 "2019-12-13T14:44:36Z")

</div>

> [@David\_Dixon](#):
>
> Is it possible that the version of cdash I use is not compatible with this feature?

That’s my hunch too. This feature was added to CDash here:

> <https://github.com/Kitware/CDash/commit/2a27b4eb8dd4302f2fd4b2d5f1978e289681100c>
>
> If CTest provides us with the name, site, and stamp for a build,
> we now assign a… buildid upon submission time. Previously a buildid
> did not get assigned until parse time.

This commit (just barely) made it into CDash v2.6, so if you’re running something older CDash won’t be able to give you back a buildid at submit time.
