Closed antonio-leblanc closed 1 year ago
https://www.reddit.com/r/embedded/comments/q8foqe/scons_vs_cmake/
"Having used both, I vastly prefer CMake. Currently using the Ninja generator for most of my projects, it's much faster than SCons.
One aspect worth considering is accessibility and ease of maintenance. SCons is a framework for constructing your own special one-off build system. It can be extremely difficult for others to use and modify as a result--knowledge gained from other SCons-based projects may well not carry over. CMake, when used properly, is extremely standardised. Anyone familiar with CMake will be able to use and modify your build. This lowers the cost and time for working on the build system within your project.
CMake continues to evolve and add useful features. Cross-compiling with toolchain files makes it easy to build with different compilers. And the new presets features makes it easy to define the supported set of build configurations you want to work on for development and releasing, again standardising things across your teams and making it easy for people to get up and running with it."
1st commit trying cmake build https://github.com/forefireAPI/firefront/commit/9c72e758aff3423eff52b396beea24ede32af6a5
Not working yet, Still need to figure how to link netcdf library
Cmake
Questions
Netcdf C++ Utils
nc-config --version
-> to check installed versionnc-config --all
-- Found NetCDF: /usr/lib/x86_64-linux-gnu/libnetcdf.so
Other
CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(forefire VERSION 1.0)
file(GLOB_RECURSE SRC_FILES src/*.cpp)
add_executable(forefire ${SRC_FILES})
target_include_directories(forefire PUBLIC usr/include)
# NOT WORKING YET -> SHOULD include netcdf
cmake-build.sh
mkdir cmakebuild
cd cmakebuild
cmake ../
make
Using makefile
only
Understanding Link Libraries Flags in Make and Cmake
Improve build structure
Alternative Build Tools for C++ projects
https://www.g2.com/products/scons/competitors/alternatives
https://julienjorge.medium.com/an-overview-of-build-systems-mostly-for-c-projects-ac9931494444