Adding module compatibility check to CMake build scripts.

- All modules have a default avr compatibilty right now (since that is what they were developed on)
- As modules get tested and added, arm support has to be turned on in the respective setup.cmake file
This commit is contained in:
Jacob Alexander 2013-01-30 18:13:49 -05:00
parent c8b4baf652
commit fc7998d605
26 changed files with 234 additions and 6 deletions

View file

@ -56,6 +56,25 @@ set( HEAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}" )
###
# Module Check Function
#
#| Usage:
#| PathPrepend( ModulePath <ListOfFamiliesSupported> )
#| Uses the ${COMPILER_FAMILY} variable
function( ModuleCompatibility ModulePath )
foreach( mod_var ${ARGN} )
if ( ${mod_var} STREQUAL ${COMPILER_FAMILY} )
# Module found, no need to scan further
return()
endif ( ${mod_var} STREQUAL ${COMPILER_FAMILY} )
endforeach( mod_var ${ARGN} )
message( FATAL_ERROR "${ModulePath} does not support the ${COMPILER_FAMILY} family..." )
endfunction( ModuleCompatibility ModulePath )
###
# Module Configuration