From 475017cb95345629dd403ee5a0b4d80e6a3f364d Mon Sep 17 00:00:00 2001 From: Navarrop Date: Wed, 19 Oct 2011 13:19:26 +0200 Subject: [PATCH] Look for simgrid into $SIMGRID_ROOT. If lib simgrid or gras.h is not found print a fatal error message. --- FindSimGrid.cmake | 62 ++++------------------------------------------- 1 file changed, 5 insertions(+), 57 deletions(-) diff --git a/FindSimGrid.cmake b/FindSimGrid.cmake index 79aaa78810..547fc47400 100644 --- a/FindSimGrid.cmake +++ b/FindSimGrid.cmake @@ -1,66 +1,17 @@ #IF YOU HAVE INSTALL SIMGRID IN A SPECIAL DIRECTORY #YOU CAN SPECIFY SIMGRID_ROOT OR GRAS_ROOT -# TO CALL THIS FILE USE - #set(CMAKE_MODULE_PATH - #${CMAKE_MODULE_PATH} - #${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Modules - #) - find_library(HAVE_SIMGRID_LIB NAME simgrid HINTS - $ENV{LD_LIBRARY_PATH} - $ENV{GRAS_ROOT} $ENV{SIMGRID_ROOT} - PATH_SUFFIXES lib64 lib - PATHS - /opt - /opt/local - /opt/csw - /sw - /usr + PATH_SUFFIXES lib ) find_path(HAVE_GRAS_H gras.h HINTS - $ENV{GRAS_ROOT} $ENV{SIMGRID_ROOT} PATH_SUFFIXES include - PATHS - /opt - /opt/local - /opt/csw - /sw - /usr -) - -find_program(HAVE_TESH - NAMES tesh - HINTS - $ENV{GRAS_ROOT} - $ENV{SIMGRID_ROOT} - PATH_SUFFIXES bin - PATHS - /opt - /opt/local - /opt/csw - /sw - /usr -) - -find_program(HAVE_GRAS_STUB - NAMES gras_stub_generator - HINTS - $ENV{GRAS_ROOT} - $ENV{SIMGRID_ROOT} - PATH_SUFFIXES bin - PATHS - /opt - /opt/local - /opt/csw - /sw - /usr ) message(STATUS "Looking for lib SimGrid") @@ -87,10 +38,7 @@ else(HAVE_GRAS_H) message(STATUS "Looking for gras.h - not found") endif(HAVE_GRAS_H) -if(HAVE_TESH) -message(STATUS "Found Tesh: ${HAVE_TESH}") -endif(HAVE_TESH) - -if(HAVE_GRAS_STUB) -message(STATUS "Found gras_stub_generator: ${HAVE_GRAS_STUB}") -endif(HAVE_GRAS_STUB) \ No newline at end of file +if(HAVE_SIMGRID_LIB AND HAVE_GRAS_H) +else(HAVE_SIMGRID_LIB AND HAVE_GRAS_H) + message(FATAL_ERROR "You need to install simgrid and set environment variable SIMGRID_ROOT!") +endif(HAVE_SIMGRID_LIB AND HAVE_GRAS_H) \ No newline at end of file -- 2.20.1