Skip to content

Commit

Permalink
Fix warning when running cmake from packaged rerun_sdk folder (#4350)
Browse files Browse the repository at this point in the history
### What

Running cmake for an unziped rerun c++ sdk package would yield this
warning:

```
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.
```

looks like there's no harm in just calling `project` again, even if the
cmake file is in the context of the our repo

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [app.rerun.io](https://app.rerun.io/pr/4350) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4350)
- [Docs
preview](https://rerun.io/preview/bf7558dce2c269d2873b2496beb67bdf745a4878/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/bf7558dce2c269d2873b2496beb67bdf745a4878/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
  • Loading branch information
Wumpf authored Nov 28, 2023
1 parent af384b2 commit b0782f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rerun_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

cmake_minimum_required(VERSION 3.16...3.27)

project(rerun_sdk LANGUAGES CXX)

message("Compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} (${CMAKE_CXX_COMPILER})")

set(RERUN_CPP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src" CACHE PATH "Rerun include & source directory")
Expand Down

0 comments on commit b0782f2

Please sign in to comment.