Compare commits

..

6 Commits

Author SHA1 Message Date
Marc Kleine-Budde 6baba4cbc5
Merge 27b5bef817 into a24bff8b08 2025-03-02 00:04:15 +01:00
Marc Kleine-Budde a24bff8b08
Merge pull request #582 from yegorich/clangd
CMakeLists.txt: enable CMAKE_EXPORT_COMPILE_COMMANDS by default
2025-03-01 16:47:48 +01:00
Yegor Yefremov fe9ea67814 CMakeLists.txt: enable CMAKE_EXPORT_COMPILE_COMMANDS by default
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2025-03-01 16:15:08 +01:00
Marc Kleine-Budde 6050aa155d
Merge pull request #581 from yegorich/cmake-linting
CMakeLists.txt: remove unneeded spaces
2025-03-01 12:33:50 +01:00
Yegor Yefremov 302184f383 CMakeLists.txt: remove unneeded spaces
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2025-03-01 10:51:12 +01:00
Oliver Hartkopp c542c9ada7 gitignore: remove accidentally added Makefile item
Fixes: 4577316bd6 ("Update .gitignore")
Link: https://github.com/linux-can/can-utils/pull/577#issuecomment-2690362731
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2025-02-28 21:34:03 +01:00
2 changed files with 9 additions and 6 deletions

1
.gitignore vendored
View File

@ -6,7 +6,6 @@
.ccls-cache .ccls-cache
CMakeCache.txt CMakeCache.txt
CMakeFiles/ CMakeFiles/
Makefile
cmake_install.cmake cmake_install.cmake
compile_commands.json compile_commands.json
tags tags

View File

@ -4,14 +4,18 @@ project(can-utils LANGUAGES C)
message(STATUS "CMake version: ${CMAKE_VERSION}") message(STATUS "CMake version: ${CMAKE_VERSION}")
include (CheckFunctionExists) include(CheckFunctionExists)
include (CheckSymbolExists) include(CheckSymbolExists)
include (GNUInstallDirs) include(GNUInstallDirs)
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release) set(CMAKE_BUILD_TYPE Release)
endif() endif()
if(CMAKE_EXPORT_COMPILE_COMMANDS STREQUAL "")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "project default" FORCE)
endif()
# Add an option to enable treating warnings as errors # Add an option to enable treating warnings as errors
option(ENABLE_WERROR "Treat all compiler warnings as errors" OFF) option(ENABLE_WERROR "Treat all compiler warnings as errors" OFF)
@ -32,8 +36,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCLOCK_TAI=11")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSO_TXTIME=61") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSO_TXTIME=61")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSCM_TXTIME=SO_TXTIME") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSCM_TXTIME=SO_TXTIME")
include_directories (.) include_directories(.)
include_directories (./include) include_directories(./include)
check_function_exists(fork HAVE_FORK) check_function_exists(fork HAVE_FORK)