cmake: allow build outside project root

Change the aspect weaver project path to all source paths (src, simulators,
debuggers, tools) and the <build>/src path.
Without this change "external" builds do work but do not weave in any
experiments. This change also allows multiple build directories within the
project root, as the weaver will no longer use aspects from all builds.
When further source directories are added to the project root, these
definitions will need to be updated.

Change-Id: If3d3d9fe61427fcba8b815171c8acdcdeb06cb69
This commit is contained in:
Florian Lukas
2013-08-22 13:46:45 +02:00
parent e006c4da0a
commit 9ac7c8b83c
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ if(BUILD_BOCHS)
set(bochs_configure_params --enable-a20-pin --enable-x86-64 --enable-cpu-level=6 --enable-ne2000 --enable-acpi --enable-pci --enable-usb --enable-trace-cache --enable-fast-function-calls --enable-host-specific-asms --enable-disasm --enable-readline --enable-clgd54xx --enable-fpu --enable-vmx=2 --enable-monitor-mwait --enable-cdrom --enable-sb16=linux --enable-gdb-stub --disable-docbook --with-all-libs CACHE STRING "Bochs default configure parameters")
## Bochs CXX args for calling make
set(bochs_build_CXX CXX=ag++\ -p\ ${PROJECT_SOURCE_DIR}\ -I${PROJECT_SOURCE_DIR}/src/core\ -I${CMAKE_BINARY_DIR}/src/core\ ${CMAKE_AGPP_FLAGS}\ --Xcompiler)
set(bochs_build_CXX CXX=ag++\ -p\ ${PROJECT_SOURCE_DIR}/src\ -p\ ${PROJECT_SOURCE_DIR}/simulators\ -p\ ${PROJECT_SOURCE_DIR}/debuggers\ -p\ ${PROJECT_SOURCE_DIR}/tools\ -p\ ${PROJECT_BINARY_DIR}/src\ -I${PROJECT_SOURCE_DIR}/src/core\ -I${CMAKE_BINARY_DIR}/src/core\ ${CMAKE_AGPP_FLAGS}\ --Xcompiler)
## Bochs libtool command.
set(bochs_build_LIBTOOL LIBTOOL=/bin/sh\ ./libtool\ --tag=CXX)

View File

@ -11,7 +11,7 @@ set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER "ag++")
set(CMAKE_AGPP_FLAGS "--real-instances" CACHE STRING "Additional ag++ flags, e.g. --real-instances --keep_woven")
## Here we add the build dir holding the generated header files (protobuf)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --Xweaver -p ${CMAKE_SOURCE_DIR} ${CMAKE_AGPP_FLAGS} --Xcompiler")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --Xweaver -p ${PROJECT_SOURCE_DIR}/src -p ${PROJECT_SOURCE_DIR}/simulators -p ${PROJECT_SOURCE_DIR}/debuggers -p ${PROJECT_SOURCE_DIR}/tools -p ${PROJECT_BINARY_DIR}/src ${CMAKE_AGPP_FLAGS} --Xcompiler")
add_definitions(-D_FILE_OFFSET_BITS=64)