ag++ is now called with a list of currently active aspect headers
(ag++ -a aspect1.ah -a aspect2.ah ...). This resolves several problems at
once:
- Build directories may be positioned arbitrarily now, they need not be
a subdirectory of the project anymore.
- Multiple build directories can coexist within the project tree. Before
this commit, the generated instantiate-*.ah aspect headers disturbed
neighboring build trees.
- Due to this, the regression test should be runnable much more easily
now.
- The build time was reduced by an average of about 10%.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1753 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
33 lines
1.2 KiB
CMake
33 lines
1.2 KiB
CMake
##### Verbose make ####
|
|
option( VERBOSE_MAKE "Verbose Makefile output" OFF) # defaults to OFF
|
|
set(CMAKE_VERBOSE_MAKEFILE ${VERBOSE_MAKE})
|
|
|
|
|
|
##### Compilers #####
|
|
SET( COMPILER "ag++" CACHE STRING "Use clang/gcc/ag++") # Defaults to ag++
|
|
|
|
if(${COMPILER} STREQUAL "clang")
|
|
set(CMAKE_C_COMPILER "clang")
|
|
set(CMAKE_CXX_COMPILER "clang++")
|
|
|
|
elseif(${COMPILER} STREQUAL "gcc")
|
|
set(CMAKE_C_COMPILER "gcc")
|
|
set(CMAKE_CXX_COMPILER "g++")
|
|
|
|
elseif(${COMPILER} STREQUAL "ag++")
|
|
set(CMAKE_C_COMPILER "ag++")
|
|
set(CMAKE_CXX_COMPILER "ag++")
|
|
set(CMAKE_AGPP_FLAGS "--real-instances" CACHE STRING "Additional ag++ flags, e.g. --real-instances --keep_woven")
|
|
foreach(aspect_header ${CMAKE_ASPECT_HEADERS})
|
|
list(APPEND AGPP_ASPECTLIST -a ${aspect_header})
|
|
endforeach(aspect_header)
|
|
set(AGPP_PARAMETERS ${AGPP_ASPECTLIST} -p ${CMAKE_SOURCE_DIR} ${CMAKE_AGPP_FLAGS})
|
|
unset(AGPP_ASPECTLIST)
|
|
add_definitions(${AGPP_PARAMETERS} --Xcompiler)
|
|
|
|
else(${COMPILER} STREQUAL "clang")
|
|
message(FATAL_ERROR "COMPILER must be exactly one of clang/gcc/ag++. If unsure, use 'ag++'.")
|
|
endif(${COMPILER} STREQUAL "clang")
|
|
|
|
message(STATUS "[${PROJECT_NAME}] Compiler: ${CMAKE_C_COMPILER}/${CMAKE_CXX_COMPILER}" )
|