Commit 8609d07
feat: only build tests and examples when top-level project
Guard tests and examples subdirectories with:
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
This prevents DSMySQL's tests from being built when consumed
as a FetchContent dependency by other projects.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 0bba8ba commit 8609d07
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | | - | |
135 | | - | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| |||
0 commit comments