# cmake repo/submodule

**URL:** https://community.zeek.org/t/cmake-repo-submodule/2027
**Category:** Development
**Tags:** development
**Created:** [September 19, 2011, 5:36pm UTC](https://community.zeek.org/t/cmake-repo-submodule/2027 "2011-09-19T17:36:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jonathan\_Siwek](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@Jonathan\_Siwek](https://community.zeek.org/u/Jonathan_Siwek)
#### Post date: [September 19, 2011, 5:36pm UTC](https://community.zeek.org/t/cmake-repo-submodule/2027/1 "2011-09-19T17:36:55Z")

</div>

I'd like to reorganize all the CMake-related scripts of each repository (the cmake/ dirs) into it's own repository and then just have each repo use that as a submodule. The advantage of this is decreasing the burden of maintaining CMake script changes -- there's a lot of shared code between repos that are currently maintained separately. Disadvantages might be:

1) more submodule maintenance. I think we already understand well enough how do this that it's not going to be a problem, and maintaining submodules is much less of a burden than maintaining CMake scripts in each repo

2) initializing/updating at least this cmake module after cloning the parent repo will be required to configure/build it. This is only a problem for people that weren't cloning recursively, but to take care of it I'll just make the ./configure scripts do the cmake/ submodule initialization if it sees nothing's there.

Anyone think of a reason not to go forward with that plan?

(This could wait until release-after-next, but it's been nagging at me lately).

- Jon

---

<div class="post-metadata">

### Author: ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)
#### Post date: [September 19, 2011, 5:49pm UTC](https://community.zeek.org/t/cmake-repo-submodule/2027/2 "2011-09-19T17:49:30Z")

</div>

> I'd like to reorganize all the CMake-related scripts of each  
> repository (the cmake/ dirs) into it's own repository and then just  
> have each repo use that as a submodule.

That's a very good thought.

> 1) more submodule maintenance.  
> 2) initializing/updating at least this cmake module after cloning

Both sound fine to me.

> (This could wait until release-after-next, but it's been nagging at me lately).

I'd rather do it now than later. How much work do you estimate this  
reorg to be?

Robin

---

<div class="post-metadata">

### Author: ![Jonathan\_Siwek](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@Jonathan\_Siwek](https://community.zeek.org/u/Jonathan_Siwek)
#### Post date: [September 19, 2011, 6:00pm UTC](https://community.zeek.org/t/cmake-repo-submodule/2027/3 "2011-09-19T18:00:35Z")

</div>

> I'd rather do it now than later. How much work do you estimate this  
> reorg to be?

Probably just a day or two; mostly shuffling files around and testing that I didn't break anything. I'll start on it this afternoon.

- Jon

---

<div class="post-metadata">

### Author: ![Jonathan\_Siwek](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@Jonathan\_Siwek](https://community.zeek.org/u/Jonathan_Siwek)
#### Post date: [September 20, 2011, 3:24pm UTC](https://community.zeek.org/t/cmake-repo-submodule/2027/4 "2011-09-20T15:24:47Z")

</div>

It's done now in all the masters. A regular `git pull` alone at this point is not going to be enough for anyone to make their local clones work again, make sure to also do `git submodule update --recursive --init`

- Jon

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)
#### Post date: [May 6, 2022, 3:39pm UTC](https://community.zeek.org/t/cmake-repo-submodule/2027/5 "2022-05-06T15:39:50Z")

</div>


