Skip to content

Commit

Permalink
🧑‍💻 Improve usability of conan and cmake
Browse files Browse the repository at this point in the history
Rather than running:

```
conan install .. -s build_type=Debug --build=missing
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
```

You can now simply run:

```
conan install ..
cmake ..
```

So long as this was run during setup:

```
conan profile update settings.build_type=Debug default
```

If the above command was not run to set the default build type to
"Debug" call it now in order to set it. This way you will no longer
need to use it in the conan command.

`--build=missing` will be removed soon as the
`gnu-arm-embedded-toolchain` is upgraded to override build settings and
always build on its own.
  • Loading branch information
kammce committed Jan 30, 2023
1 parent 4c0ade1 commit 875b2b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drive/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
cmake_minimum_required(VERSION 3.20)

if(NOT DEFINED CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE INTERNAL "Default to Debug Build")
endif(NOT DEFINED CMAKE_BUILD_TYPE)

set(CMAKE_TOOLCHAIN_FILE conan_toolchain.cmake)

project(demos VERSION 0.0.1 LANGUAGES CXX)

find_package(libhal-lpc40xx REQUIRED CONFIG)
Expand Down

0 comments on commit 875b2b2

Please sign in to comment.