gem5/cmake: gem5 build integration into Fail*

The SConscript in src/core/sal/gem5 is now generated via CMake
(SConscript.in).  No more hardcoded relative paths -> Fail* build
folder can now be anywhere.  Experiment and Plugin libraries are now
set automagically (using ${EXPERIMENTS_ACTIVATED} /
${PLUGINS_ACTIVATED})

Generated SConscript now resides in binary dir.

Change-Id: I1bf2e17c83c95ffdcf6801c02481064fcb63bfb0
This commit is contained in:
Martin Hoffmann
2013-05-23 18:37:22 +02:00
committed by Horst Schirmeier
parent e006c4da0a
commit a3cbb7c690
4 changed files with 23 additions and 6 deletions

View File

@ -71,6 +71,21 @@ elseif(BUILD_ARM)
set(ARCH_TOOL_PREFIX "arm-none-eabi-" CACHE PATH "Setup prefix for binutils, e.g., arm-none-eabi- or tricore-, ..")
endif(BUILD_X86)
if(BUILD_GEM5)
message(STATUS "[${PROJECT_NAME}] Generating SConscript in ${CMAKE_CURRENT_BINARY_DIR}/gem5")
set(additional_libs "")
foreach(exp ${EXPERIMENTS_ACTIVATED})
set(additional_libs "${additional_libs} '-lfail-${exp}',")
endforeach(exp)
foreach(plug ${PLUGINS_ACTIVATED})
set(additional_libs "${additional_libs} '-lfail-${plug}',")
endforeach(plug)
set(GEM5_SAL_SRCS "'${CMAKE_CURRENT_SOURCE_DIR}/gem5/Gem5Wrapper.cc'")
configure_file(gem5/SConscript.in ${CMAKE_CURRENT_BINARY_DIR}/gem5/SConscript)
endif(BUILD_GEM5)
# Don't include these sources if perf-stuff is disabled
# (reduces compiler overhead):
if(CONFIG_FAST_WATCHPOINTS)