Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demos: grand refactoring #143

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
},
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "x64-debug-docs",
"inherits": "x64-debug",
"cacheVariables": { "SILKIT_BUILD_DOCS": "ON" }
},
{
"name": "x64-release",
"displayName": "x64 Release",
Expand Down
31 changes: 18 additions & 13 deletions Demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ else()
set(_DEMO_OUTPUT_DIR "${CMAKE_BINARY_DIR}/$<CONFIG>")
endif()

set(SILKIT_DEMO_DIR ${CMAKE_CURRENT_SOURCE_DIR})

macro(make_silkit_demo executableName demoSourceFile)

add_executable(${executableName}
${demoSourceFile}
$<$<CXX_COMPILER_ID:MSVC>: "${CMAKE_CURRENT_SOURCE_DIR}/../demo.manifest" >
$<$<CXX_COMPILER_ID:MSVC>: "${CMAKE_CURRENT_SOURCE_DIR}/../../demo.manifest" >
)
remove_definitions(-DEXPORT_SilKitAPI)

Expand All @@ -124,29 +127,31 @@ macro(make_silkit_demo executableName demoSourceFile)
SilKit::SilKit
Threads::Threads
)

target_include_directories(${executableName} PRIVATE ${SILKIT_DEMO_DIR}/include)
KonradBkd marked this conversation as resolved.
Show resolved Hide resolved
if(MSVC)
target_compile_options(${executableName} PRIVATE /wd4996)
endif()

add_dependencies(Demos ${executableName})
set(demo_list "${demo_list} ${executableName}" PARENT_SCOPE)

KonradBkd marked this conversation as resolved.
Show resolved Hide resolved
endmacro()

#######################################################################################################################
# Add the actual demo projects
#######################################################################################################################
# C++ Demos
add_subdirectory(Can)
add_subdirectory(Ethernet)
add_subdirectory(Flexray)
add_subdirectory(Lin)
add_subdirectory(PubSub)
add_subdirectory(Rpc)
add_subdirectory(Benchmark)
add_subdirectory(NetworkSimulator)

message(STATUS "Demos available: ${demo_list}")
set_property(GLOBAL PROPERTY demo_list_property "")

add_subdirectory(communication/Can)
add_subdirectory(communication/Ethernet)
add_subdirectory(communication/Flexray)
add_subdirectory(communication/Lin)
add_subdirectory(communication/PubSub)
add_subdirectory(communication/Rpc)
add_subdirectory(tools/Benchmark)
add_subdirectory(api/SimpleCan)
add_subdirectory(api/NetworkSimulator)

#######################################################################################################################
# VisualStudio specific setup
#######################################################################################################################
Expand Down
27 changes: 0 additions & 27 deletions Demos/Can/CMakeLists.txt

This file was deleted.

287 changes: 0 additions & 287 deletions Demos/Can/CanDemo.cpp

This file was deleted.

5 changes: 0 additions & 5 deletions Demos/Can/DemoCan.silkit.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions Demos/Can/NetworkSimulatorConfig.yaml

This file was deleted.

Loading
Loading