From de7c6784cf022c9b0e44325d1443eb5230496b86 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 17 Mar 2016 14:55:56 +0100 Subject: [PATCH] add examples and tests to project for IDEs This adds the example and test source and header files to the cmake project with a dummy target that is not built. IDEs like qtcreator will then include the files inside the project. --- examples/CMakeLists.txt | 12 ++++++++++++ tests/CMakeLists.txt | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index fd6d05b864..f2dc23cb41 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -48,3 +48,15 @@ IF(DEAL_II_COMPONENT_EXAMPLES) MESSAGE(STATUS "Setting up examples - Done") ENDIF() + +# +# Add a dummy target to make files known to IDEs like qtcreator +# + +FILE(GLOB _misc + ${CMAKE_CURRENT_SOURCE_DIR}/step-*/*.cc + ${CMAKE_CURRENT_SOURCE_DIR}/step-*/*.h +) +ADD_CUSTOM_TARGET(dummy_examples_files + SOURCES ${_misc} + ) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 60a835dbe4..f444fe3e2f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -141,5 +141,20 @@ ENDFOREACH() IF(DEFINED DEAL_II_HAVE_TESTS_DIRECTORY) + # + # Add a dummy target to make files known to IDEs like qtcreator + # + + FILE(GLOB _misc + ${CMAKE_CURRENT_SOURCE_DIR}/*.cc + ${CMAKE_CURRENT_SOURCE_DIR}/*.h + ${CMAKE_CURRENT_SOURCE_DIR}/*/*.cc + ${CMAKE_CURRENT_SOURCE_DIR}/*/*.h + ) + + ADD_CUSTOM_TARGET(dummy_tests_files + SOURCES ${_misc} + ) + MESSAGE(STATUS "Setting up testsuite - Done") ENDIF() -- 2.39.5