Commit cce7575b authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[cmake] Make cmake find gstat, add all necessary variables, and add macro for linking gstat files

parent 7a803688
# Creates symbolic links to all gstat files in the source directory
macro(add_gstat_file_links)
FILE(GLOB gstat_files gstat*.txt *.gstat)
foreach(VAR ${gstat_files})
get_filename_component(file_name ${VAR} NAME)
dune_symlink_to_source_files(FILES ${file_name})
endforeach()
endmacro()
# additional macros
include(AddGstatFileLinks)
include(AddInputFileLinks)
include(DumuxDoxygen)
include(DumuxTestMacros)
find_package(Gstat)
find_package(Gnuplot)
set(HAVE_GNUPLOT ${GNUPLOT_FOUND})
......
#
# Module that checks whether gstat has been installed
#
# Sets the following variables:
# GSTAT_FOUND True if gstat was found
# GSTAT_EXECUTABLE Path to gstat executable
# look for header files, only at positions given by the user
find_program(GSTAT_EXECUTABLE
NAMES gstat
PATHS "${CMAKE_SOURCE_DIR}/../external/gstat/src"
"usr/bin/"
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
"Gstat"
DEFAULT_MSG
GSTAT_EXECUTABLE
)
# set macros for config.h
set(HAVE_GSTAT ${GSTAT_FOUND})
set(GSTAT_EXECUTABLE ${GSTAT_EXECUTABLE})
......@@ -50,6 +50,12 @@
/* Define path to gnuplot executable */
#cmakedefine GNUPLOT_EXECUTABLE "@GNUPLOT_EXECUTABLE@"
/* Define to 1 if gstat was found */
#cmakedefine HAVE_GSTAT 1
/* Define path to gstat executable */
#cmakedefine GSTAT_EXECUTABLE "@GSTAT_EXECUTABLE@"
/* end dumux
Everything below here will be overwritten
*/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment