Skip to content

Commit

Permalink
Merge pull request #37 from rdaruwala/cmake_updates
Browse files Browse the repository at this point in the history
CMake + RPI Demo Updates
  • Loading branch information
LeStarch authored May 24, 2019
2 parents 44bc575 + b078446 commit e16d875
Show file tree
Hide file tree
Showing 16 changed files with 463 additions and 26 deletions.
6 changes: 6 additions & 0 deletions Drv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# Ports
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/DataTypes/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/GpioDriverPorts/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SerialDriverPorts/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SpiDriverPorts/")

# Components
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/BlockDriver/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriver/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriver/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriver/")
13 changes: 13 additions & 0 deletions Drv/GpioDriverPorts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
####
# F prime CMakeLists.txt:
#
# SOURCE_FILES: combined list of source and autocoding diles
# MOD_DEPS: (optional) module dependencies
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/GpioWritePortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/GpioReadPortAi.xml"
)

register_fprime_module()
41 changes: 41 additions & 0 deletions Drv/LinuxGpioDriver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
####
# F prime CMakeLists.txt:
#
# SOURCE_FILES: combined list of source and autocoding diles
# MOD_DEPS: (optional) module dependencies
#
####


if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentImplStub.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentImpl.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "CygWin")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentImpl.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "arm-linux-gnueabihf")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentImpl.cpp"
)
else()
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxGpioDriverComponentImplCommon.cpp"
)
endif()

register_fprime_module()
41 changes: 41 additions & 0 deletions Drv/LinuxSerialDriver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
####
# F prime CMakeLists.txt:
#
# SOURCE_FILES: combined list of source and autocoding diles
# MOD_DEPS: (optional) module dependencies
#
####


if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentImplStub.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentImpl.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "CygWin")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentImpl.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "arm-linux-gnueabihf")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentImpl.cpp"
)
else()
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSerialDriverComponentImplCommon.cpp"
)
endif()

register_fprime_module()
41 changes: 41 additions & 0 deletions Drv/LinuxSpiDriver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
####
# F prime CMakeLists.txt:
#
# SOURCE_FILES: combined list of source and autocoding diles
# MOD_DEPS: (optional) module dependencies
#
####


if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentImplStub.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentImpl.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "CygWin")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentImpl.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "arm-linux-gnueabihf")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentImplCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentImpl.cpp"
)
else()
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/LinuxSpiDriverComponentImplCommon.cpp"
)
endif()

register_fprime_module()
2 changes: 1 addition & 1 deletion Drv/LinuxSpiDriver/LinuxSpiDriverComponentImplStub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace Drv {

void LinuxSpiDriverComponentImpl::open(NATIVE_INT_TYPE device,
bool LinuxSpiDriverComponentImpl::open(NATIVE_INT_TYPE device,
NATIVE_INT_TYPE select,
SpiFrequency clock) {

Expand Down
13 changes: 13 additions & 0 deletions Drv/SerialDriverPorts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
####
# F prime CMakeLists.txt:
#
# SOURCE_FILES: combined list of source and autocoding diles
# MOD_DEPS: (optional) module dependencies
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/SerialReadPortAi.xml"
"${CMAKE_CURRENT_LIST_DIR}/SerialWritePortAi.xml"
)

register_fprime_module()
12 changes: 12 additions & 0 deletions Drv/SpiDriverPorts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
####
# F prime CMakeLists.txt:
#
# SOURCE_FILES: combined list of source and autocoding diles
# MOD_DEPS: (optional) module dependencies
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/SpiReadWritePortAi.xml"
)

register_fprime_module()
161 changes: 139 additions & 22 deletions Os/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,145 @@
# MOD_DEPS: (optional) module dependencies
#
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/Linux/File.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/FileSystem.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/InterruptLock.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/WatchdogTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogPrintf.cpp"
"${CMAKE_CURRENT_LIST_DIR}/MemCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Mutex.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Task.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/BufferQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/MaxHeap/MaxHeap.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/PriorityBufferQueue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/Queue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/SimpleQueueRegistry.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidateFileCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/X86/IntervalTimer.cpp"
)

if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/MacOs/IPCQueueStub.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/Queue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/BufferQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/PriorityBufferQueue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/MaxHeap/MaxHeap.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/File.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Task.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogPrintf.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/InterruptLock.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/WatchdogTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/X86/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Mutex.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/FileSystem.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/IPCQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/SimpleQueueRegistry.cpp"
"${CMAKE_CURRENT_LIST_DIR}/MemCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidateFileCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidatedFile.cpp"
"${CMAKE_CURRENT_LIST_DIR}/FileCommon.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/Posix/IPCQueue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/Queue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/BufferQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/PriorityBufferQueue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/MaxHeap/MaxHeap.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/File.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Task.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogPrintf.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/InterruptLock.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/WatchdogTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/X86/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Mutex.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/FileSystem.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/LocklessQueue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/IPCQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/SimpleQueueRegistry.cpp"
"${CMAKE_CURRENT_LIST_DIR}/MemCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidateFileCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidatedFile.cpp"
"${CMAKE_CURRENT_LIST_DIR}/FileCommon.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "CygWin")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/Queue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/BufferQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/PriorityBufferQueue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/MaxHeap/MaxHeap.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/File.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Task.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogPrintf.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/InterruptLock.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/WatchdogTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/X86/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Mutex.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/FileSystem.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/IPCQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/SimpleQueueRegistry.cpp"
"${CMAKE_CURRENT_LIST_DIR}/MemCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidateFileCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidatedFile.cpp"
"${CMAKE_CURRENT_LIST_DIR}/FileCommon.cpp"
)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "arm-linux-gnueabihf")
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/Queue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/BufferQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/PriorityBufferQueue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/MaxHeap/MaxHeap.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/File.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Task.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogPrintf.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/InterruptLock.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/WatchdogTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/X86/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Mutex.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/FileSystem.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/IPCQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/SimpleQueueRegistry.cpp"
"${CMAKE_CURRENT_LIST_DIR}/MemCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidateFileCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidatedFile.cpp"
"${CMAKE_CURRENT_LIST_DIR}/FileCommon.cpp"
)
else()
# Default Linux
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/Posix/IPCQueue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/Queue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/BufferQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/PriorityBufferQueue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Pthreads/MaxHeap/MaxHeap.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/File.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Task.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogPrintf.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/InterruptLock.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/WatchdogTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/X86/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/IntervalTimer.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/Mutex.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Linux/FileSystem.cpp"
"${CMAKE_CURRENT_LIST_DIR}/Posix/LocklessQueue.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/TaskCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/QueueString.cpp"
"${CMAKE_CURRENT_LIST_DIR}/IPCQueueCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/SimpleQueueRegistry.cpp"
"${CMAKE_CURRENT_LIST_DIR}/MemCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidateFileCommon.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ValidatedFile.cpp"
"${CMAKE_CURRENT_LIST_DIR}/FileCommon.cpp"
)
endif()

set(MOD_DEPS
"${CMAKE_THREAD_LIBS_INIT}"
Fw/Cfg
Expand Down
Loading

0 comments on commit e16d875

Please sign in to comment.