MENU
Contact
Contact

Bazel vs. CMake: Discover the advantages of Bazel migration

Picture of Krzysztof Romanowski, Head of Scala & Dev Tooling

Krzysztof Romanowski

Head of Scala & Dev Tooling
Apr 29, 2024|10 min read
Image Alt
1# CMakeLists.txt
2cmake_minimum_required(VERSION 3.0)
3project(MyProject)
4
5# Find Boost package
6find_package(Boost REQUIRED COMPONENTS filesystem)
7
8# Add source files
9set(SOURCES
10 main.cpp
11)
12
13# Define executable target
14add_executable(MyExecutable ${SOURCES})
15
16# Link the Boost filesystem library to the executable
17target_link_libraries(MyExecutable PRIVATE Boost::filesystem)
18
1# BUILD file
2cc_binary(
3 name = "my_executable",
4 srcs = ["main.cpp"],
5 deps = [“@boost//:filesystem”],
6)

Curated by Sebastian Synowiec

Subscribe to our newsletter and never miss an article