Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this user
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
golwalkars
/
7166CEM
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Projects
0
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Projects
Security
Insights
Files
2dab3d5
include
lib
src
CMakeCache.txt
CMakeLists.txt
Makefile
README.md
can_wrap.hpp
candata.dbc
candump.log
catch.hpp
cmake_install.cmake
data.dbc_
Breadcrumbs
7166CEM
/
CMakeLists.txt
Blame
Blame
Latest commit
History
History
29 lines (22 loc) · 967 Bytes
Breadcrumbs
7166CEM
/
CMakeLists.txt
Top
File metadata and controls
Code
Blame
29 lines (22 loc) · 967 Bytes
Raw
cmake_minimum_required(VERSION 3.0) set(CMAKE_CXX_STANDARD 17) project(dbc_example C CXX) # location of source code files include_directories( include ) # tell cmake where to put the executables that it creates file( MAKE_DIRECTORY bin ) set( CMAKE_RUNTIME_OUTPUT_DIRECTORY bin ) # where to put the object files it creates file( MAKE_DIRECTORY lib ) SET( LIBRARY_OUTPUT_PATH lib ) # autogenerate code from the DBC file file( MAKE_DIRECTORY src_autogen ) add_custom_command( OUTPUT src_autogen/candata.h src_autogen/candata.c COMMAND python3 -m cantools generate_c_source candata.dbc -o src_autogen MAIN_DEPENDENCY candata.dbc COMMENT "Autogenerate code from DBC file" ) # create shared library of the autogenerated code from the DBC file add_library( candata SHARED src_autogen/candata.c ) target_include_directories( candata PUBLIC src_autogen ) add_executable( main src/main.c ) target_link_libraries( main PRIVATE candata )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
You can’t perform that action at this time.