Skip to content
Snippets Groups Projects
Commit 5de58da2 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'cleanup/cmake' into 'master'

[cmake] Several smaller cleanups

See merge request !2903
parents 675c8987 929aa96c
No related branches found
No related tags found
1 merge request!2903[cmake] Several smaller cleanups
Pipeline #10325 failed
Pipeline: dumux

#10329

    Pipeline: dumux

    #10328

      Pipeline: dumux

      #10327

        +1
        # Creates symbolic links to all gstat files in the source directory # Creates symbolic links to all gstat files in the source directory
        include_guard(GLOBAL)
        macro(add_gstat_file_links) macro(add_gstat_file_links)
        FILE(GLOB gstat_files gstat*.txt *.gstat) FILE(GLOB gstat_files gstat*.txt *.gstat)
        foreach(VAR ${gstat_files}) foreach(VAR ${gstat_files})
        ......
        # Creates symbolic links to all input files in the source directory # Creates symbolic links to all input files in the source directory
        include_guard(GLOBAL)
        macro(add_input_file_links) macro(add_input_file_links)
        FILE(GLOB input_files *.input) FILE(GLOB input_files *.input)
        foreach(VAR ${input_files}) foreach(VAR ${input_files})
        ......
        # add_dumux_doxgen_target # add_dumux_doxgen_target
        # #
        # make sure, that the doxygen links to todo list, bibliography, etc. are correct # make sure, that the doxygen links to todo list, bibliography, etc. are correct
        MACRO (add_dumux_doxygen_target) include_guard(GLOBAL)
        macro (add_dumux_doxygen_target)
        if(DOXYGEN_FOUND) if(DOXYGEN_FOUND)
        add_doxygen_target() add_doxygen_target()
        add_custom_target(doxygen_${ProjectName}_prebuild add_custom_target(doxygen_${ProjectName}_prebuild
        ...@@ -11,4 +13,4 @@ MACRO (add_dumux_doxygen_target) ...@@ -11,4 +13,4 @@ MACRO (add_dumux_doxygen_target)
        POST_BUILD POST_BUILD
        COMMAND ${CMAKE_SOURCE_DIR}/doc/doxygen/sanitizelinks.sh) COMMAND ${CMAKE_SOURCE_DIR}/doc/doxygen/sanitizelinks.sh)
        endif() endif()
        ENDMACRO () endmacro ()
        ...@@ -4,12 +4,12 @@ include(AddInputFileLinks) ...@@ -4,12 +4,12 @@ include(AddInputFileLinks)
        include(DumuxDoxygen) include(DumuxDoxygen)
        include(DumuxTestMacros) include(DumuxTestMacros)
        find_package(GLPK) find_package(GLPK QUIET)
        find_package(Gnuplot) find_package(Gnuplot QUIET)
        set(HAVE_GNUPLOT ${GNUPLOT_FOUND}) set(HAVE_GNUPLOT ${GNUPLOT_FOUND})
        find_package(Gstat) find_package(Gstat QUIET)
        find_package(Gmsh) find_package(Gmsh QUIET)
        find_package(NLOPT) find_package(NLOPT QUIET)
        find_package(PTScotch) find_package(PTScotch QUIET)
        include(AddPTScotchFlags) include(AddPTScotchFlags)
        find_package(PVPython) find_package(PVPython QUIET)
        ...@@ -199,6 +199,7 @@ ...@@ -199,6 +199,7 @@
        # Example: Write CMAKE_GUARD dune-foo_FOUND if you want to set a variable # Example: Write CMAKE_GUARD dune-foo_FOUND if you want to set a variable
        # that is only true if the module dune-foo has been found. # that is only true if the module dune-foo has been found.
        # #
        include_guard(GLOBAL)
        # Note: This forwards to dune_add_test but enables another layer in case we need to support # Note: This forwards to dune_add_test but enables another layer in case we need to support
        # future Dune features with older Dune versions supported by Dumux # future Dune features with older Dune versions supported by Dumux
        ......
        ...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
        # GLPK_INCLUDE_DIRS Path to the GLPK include dirs. # GLPK_INCLUDE_DIRS Path to the GLPK include dirs.
        # GLPK_LIBRARIES Name to the GLPK library. # GLPK_LIBRARIES Name to the GLPK library.
        # #
        include_guard(GLOBAL)
        # look for header files, only at positions given by the user # look for header files, only at positions given by the user
        find_path(GLPK_INCLUDE_DIR find_path(GLPK_INCLUDE_DIR
        ...@@ -100,5 +101,6 @@ if(GLPK_FOUND) ...@@ -100,5 +101,6 @@ if(GLPK_FOUND)
        endif() endif()
        # text for feature summary # text for feature summary
        include(FeatureSummary)
        set_package_properties("GLPK" PROPERTIES set_package_properties("GLPK" PROPERTIES
        DESCRIPTION "GNU Linear Programming Kit") DESCRIPTION "GNU Linear Programming Kit")
        ...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
        # for the gmsh library in the given path before inspecting # for the gmsh library in the given path before inspecting
        # system paths. # system paths.
        # #
        include_guard(GLOBAL)
        # look for header files, only at positions given by the user # look for header files, only at positions given by the user
        find_program(GMSH_EXECUTABLE find_program(GMSH_EXECUTABLE
        ...@@ -35,16 +36,17 @@ find_program(GMSH_EXECUTABLE ...@@ -35,16 +36,17 @@ find_program(GMSH_EXECUTABLE
        include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
        find_package_handle_standard_args( find_package_handle_standard_args(
        "gmsh" "Gmsh"
        DEFAULT_MSG DEFAULT_MSG
        GMSH_EXECUTABLE GMSH_EXECUTABLE
        ) )
        # set macros for config.h # set macros for config.h
        set(HAVE_GMSH ${gmsh_FOUND}) set(HAVE_GMSH ${Gmsh_FOUND})
        set(GMSH_EXECUTABLE ${GMSH_EXECUTABLE}) set(GMSH_EXECUTABLE ${GMSH_EXECUTABLE})
        # text for feature summary # text for feature summary
        include(FeatureSummary)
        set_package_properties("Gmsh" PROPERTIES set_package_properties("Gmsh" PROPERTIES
        DESCRIPTION "Meshing tool" DESCRIPTION "Meshing tool"
        PURPOSE "Generate structured and unstructured grids") PURPOSE "Generate structured and unstructured grids")
        ...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
        # for the gstat library in the given path before inspecting # for the gstat library in the given path before inspecting
        # system paths. # system paths.
        # #
        include_guard(GLOBAL)
        # look for header files, only at positions given by the user # look for header files, only at positions given by the user
        find_program(GSTAT_EXECUTABLE find_program(GSTAT_EXECUTABLE
        ...@@ -45,6 +46,7 @@ set(HAVE_GSTAT ${GSTAT_FOUND}) ...@@ -45,6 +46,7 @@ set(HAVE_GSTAT ${GSTAT_FOUND})
        set(GSTAT_EXECUTABLE ${GSTAT_EXECUTABLE}) set(GSTAT_EXECUTABLE ${GSTAT_EXECUTABLE})
        # text for feature summary # text for feature summary
        include(FeatureSummary)
        set_package_properties("Gstat" PROPERTIES set_package_properties("Gstat" PROPERTIES
        DESCRIPTION "Geostatistic library" DESCRIPTION "Geostatistic library"
        PURPOSE "Generate random permeability and porosity fields") PURPOSE "Generate random permeability and porosity fields")
        ...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
        # NLOPT_INCLUDE_DIRS Path to the NLOPT include dirs. # NLOPT_INCLUDE_DIRS Path to the NLOPT include dirs.
        # NLOPT_LIBRARIES Name to the NLOPT library. # NLOPT_LIBRARIES Name to the NLOPT library.
        # #
        include_guard(GLOBAL)
        # look for header files, only at positions given by the user # look for header files, only at positions given by the user
        find_path(NLOPT_INCLUDE_DIR find_path(NLOPT_INCLUDE_DIR
        ...@@ -101,5 +102,6 @@ if(NLOPT_FOUND) ...@@ -101,5 +102,6 @@ if(NLOPT_FOUND)
        endif() endif()
        # text for feature summary # text for feature summary
        include(FeatureSummary)
        set_package_properties("NLOPT" PROPERTIES set_package_properties("NLOPT" PROPERTIES
        DESCRIPTION "Library for nonlinear optimization") DESCRIPTION "Library for nonlinear optimization")
        ...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
        # for the pvpython library in the given path before inspecting # for the pvpython library in the given path before inspecting
        # system paths. # system paths.
        # #
        include_guard(GLOBAL)
        # look for header files, only at positions given by the user # look for header files, only at positions given by the user
        find_program(PVPYTHON_EXECUTABLE find_program(PVPYTHON_EXECUTABLE
        ...@@ -45,6 +46,7 @@ set(HAVE_PVPYTHON ${PVPYTHON_FOUND}) ...@@ -45,6 +46,7 @@ set(HAVE_PVPYTHON ${PVPYTHON_FOUND})
        set(PVPYTHON_EXECUTABLE ${PVPYTHON_EXECUTABLE}) set(PVPYTHON_EXECUTABLE ${PVPYTHON_EXECUTABLE})
        # text for feature summary # text for feature summary
        include(FeatureSummary)
        set_package_properties("PVPython" PROPERTIES set_package_properties("PVPython" PROPERTIES
        DESCRIPTION "ParaView python client" DESCRIPTION "ParaView python client"
        PURPOSE "Extract data over line or time in post-processing") PURPOSE "Extract data over line or time in post-processing")
        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