|
|
|
@ -2,19 +2,19 @@ cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
|
|
|
|
|
include(config_files/cmakeProjectConfig.cmake)
|
|
|
|
|
|
|
|
|
|
set(BSL_DIR ${CMAKE_SOURCE_DIR}/bsl/${BSL_USED})
|
|
|
|
|
set(CSL_DIR ${CMAKE_SOURCE_DIR}/csl/${CSL_USED})
|
|
|
|
|
|
|
|
|
|
if(EXISTS ${BSL_DIR}) # Cheking if the directory exists
|
|
|
|
|
message("${BoldGreen}Compiling for ${BSL_USED} ${ColourReset}")
|
|
|
|
|
set(COMPILER_DEFS ${BSL_DIR}/bslCompiler.cmake)
|
|
|
|
|
set(PROJECT_DEFS ${BSL_DIR}/bslConfig.cmake)
|
|
|
|
|
if(EXISTS ${CSL_DIR}) # Cheking if the directory exists
|
|
|
|
|
message("${BoldGreen}Compiling for ${CSL_USED} ${ColourReset}")
|
|
|
|
|
set(COMPILER_DEFS ${CSL_DIR}/compiler.cmake)
|
|
|
|
|
set(PROJECT_DEFS ${CSL_DIR}/config.cmake)
|
|
|
|
|
else()
|
|
|
|
|
message( FATAL_ERROR "${BoldRed}Please Select a valid BSL, CMake will exit.${ColourReset}" )
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
include(${COMPILER_DEFS})
|
|
|
|
|
|
|
|
|
|
project(${BSL_USED} ASM C CXX) #do this intead sf declaring languages in the beginning it will prevent loop errors.
|
|
|
|
|
project(${CSL_USED} ASM C CXX) #do this intead sf declaring languages in the beginning it will prevent loop errors.
|
|
|
|
|
|
|
|
|
|
set(CMAKE_VERBOSE_MAKEFILE off) #Shoul make print everythign ??
|
|
|
|
|
set(EXECUTABLE ${PROJECT_NAME}) #Create the executable
|
|
|
|
@ -22,7 +22,7 @@ set(EXECUTABLE ${PROJECT_NAME}) #Create the executable
|
|
|
|
|
####################################################################################################
|
|
|
|
|
#CONFIG FILE
|
|
|
|
|
####################################################################################################
|
|
|
|
|
set(INTERFACES_DIR ${CMAKE_SOURCE_DIR}/bsl/csl/interfaces)
|
|
|
|
|
set(INTERFACES_DIR ${CMAKE_SOURCE_DIR}/csl/interfaces)
|
|
|
|
|
set(UTILS_DIR ${CMAKE_SOURCE_DIR}/utils/assert)
|
|
|
|
|
|
|
|
|
|
####################################################################################################
|
|
|
|
@ -30,10 +30,7 @@ set(UTILS_DIR ${CMAKE_SOURCE_DIR}/utils/assert)
|
|
|
|
|
####################################################################################################
|
|
|
|
|
include(${PROJECT_DEFS})
|
|
|
|
|
add_subdirectory(utils)
|
|
|
|
|
add_subdirectory(bsl)
|
|
|
|
|
|
|
|
|
|
#set(BSL_HEADER_FILE ${CMAKE_SOURCE_DIR}/bsl/raspberry/bsl_raspberry.hpp)
|
|
|
|
|
#set(BSL_HEADER_FILE ${CMAKE_SOURCE_DIR}/bsl/nucleo_f042k6/bsl_nucleo_f042k6.hpp)
|
|
|
|
|
add_subdirectory(csl)
|
|
|
|
|
|
|
|
|
|
message("${BoldBlue}Project Info ${ColourReset}")
|
|
|
|
|
message("${Blue} |--> Exec Name \t: ${EXECUTABLE} ${ColourReset}")
|
|
|
|
|