Skip to content
Snippets Groups Projects
Commit d95cb3ca authored by Stefan Girke's avatar Stefan Girke
Browse files

add qtcreator helper stuff

parent 45a8e4c3
No related branches found
No related tags found
No related merge requests found
......@@ -54,3 +54,5 @@ cmake/modules/petsc
config_collected.h.cmake
dune-fem-dg-config-version.cmake
dune-fem-dg-config.cmake
*.idea
......@@ -17,6 +17,7 @@ include(DuneMacros)
# start a dune project with information from dune.module
dune_project()
include(DuneMPI)
#add sub directories
......@@ -26,5 +27,9 @@ dune_add_subdirs( dune lib doc cmake/modules )
#set( _dirnew dune/fem-dg/examples/advdiff_test )
#set_property(DIRECTORY ${_dirnew} PROPERTY TEST_INCLUDE_FILE ${CMAKE_BINARY_DIR}/${_dirnew}/BuildTests.cmake)
make_dependent_modules_sys_included()
add_header_listing()
# finalize the dune project, e.g., generate config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
......@@ -93,5 +93,36 @@ endfunction()
set(FEMDG_FAST_TESTBUILD ON CACHE BOOL
"only build the most important tests when calling 'make test'" )
macro(add_header_listing)
# header
file( GLOB_RECURSE header "${CMAKE_CURRENT_SOURCE_DIR}/*.hh" "${CMAKE_CURRENT_SOURCE_DIR}/*.h "${CMAKE_CURRENT_SOURCE_DIR}/*.ui"")
set( COMMON_HEADER ${header} ${DUNE_HEADERS} )
# add header of dependent modules for header listing
foreach(_mod ${ALL_DEPENDENCIES})
file(GLOB_RECURSE HEADER_LIST "${CMAKE_CURRENT_SOURCE_DIR}/../${_mod}/*.hh" "${CMAKE_CURRENT_SOURCE_DIR}/../${_mod}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/../${_mod}/*.ui")
list(APPEND COMMON_HEADER ${HEADER_LIST})
endforeach(_mod DEPENDENCIES)
set_source_files_properties(${COMMON_HEADER} PROPERTIES HEADER_FILE_ONLY 1)
add_custom_target(common_header SOURCES ${COMMON_HEADER})
#needed at least one official target for finding header files in source code
dune_add_test( NAME _h SOURCES ${COMMON_HEADER} )
set_target_properties(_h PROPERTIES LINKER_LANGUAGE CXX)
endmacro(add_header_listing)
macro(make_dependent_modules_sys_included)
#disable most warnings from dependent modules
foreach(_mod ${ALL_DEPENDENCIES})
if(${_mod}_INCLUDE_DIRS)
foreach( _idir ${${_mod}_INCLUDE_DIRS} )
add_definitions("-isystem ${_idir}")
endforeach( _idir )
endif(${_mod}_INCLUDE_DIRS)
endforeach(_mod DEPENDENCIES)
endmacro(make_dependent_modules_sys_included)
include(Codegen)
include(TargetDistclean)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment