diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..edb3f142ff8924781216826e65dc90aa98b115b8 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 2.8.6) +project(dune-gfe CXX) + +if(NOT (dune-common_DIR OR dune-common_ROOT OR + "${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*")) + string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR + ${PROJECT_BINARY_DIR}) +endif() + +#find dune-common and set the module path +find_package(dune-common REQUIRED) +list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules" + ${dune-common_MODULE_PATH}) + +#include the dune macros +include(DuneMacros) + +# start a dune project with information from dune.module +dune_project() + +add_subdirectory("src") +add_subdirectory("m4") +add_subdirectory("dune") +add_subdirectory("doc") +add_subdirectory("cmake/modules") + +# finalize the dune project, e.g. generating config.h etc. +finalize_dune_project(GENERATE_CONFIG_H_CMAKE) diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..34ddc41d636fa635cfeb6500ecb34048ba7c0684 --- /dev/null +++ b/cmake/modules/CMakeLists.txt @@ -0,0 +1,3 @@ +set(modules "DuneGfeMacros.cmake") + +install(FILES ${modules} DESTINATION ${DUNE_INSTALL_MODULEDIR}) diff --git a/cmake/modules/DuneGfeMacros.cmake b/cmake/modules/DuneGfeMacros.cmake new file mode 100644 index 0000000000000000000000000000000000000000..613dfb664b75999b008f0003a4d7c409cbf409ad --- /dev/null +++ b/cmake/modules/DuneGfeMacros.cmake @@ -0,0 +1 @@ +# File for module specific CMake tests. diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..be52cfccb403e159965b4f9c1a4bbe109a0462c1 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory("doxygen") diff --git a/doc/doxygen/CMakeLists.txt b/doc/doxygen/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..f7b8ea5c993424d9524394428ec8f2ca9160b66a --- /dev/null +++ b/doc/doxygen/CMakeLists.txt @@ -0,0 +1,2 @@ +# shortcut for creating the Doxyfile.in and Doxyfile +add_doxygen_target() diff --git a/dune/CMakeLists.txt b/dune/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..d7f4cb299fb07b549575c4ee365b4991cd7c891c --- /dev/null +++ b/dune/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(gfe) diff --git a/dune/gfe/CMakeLists.txt b/dune/gfe/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..7ffd4e92a85db2846bb920bb776fc5f24aebd128 --- /dev/null +++ b/dune/gfe/CMakeLists.txt @@ -0,0 +1,3 @@ +#install headers +install(FILES gfe.hh DESTINATION include/dune/gfe) +