Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use {include,link}_directories for Find{F2C,Graphviz,Lua51} too.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 14 Jun 2012 14:15:36 +0000 (16:15 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 14 Jun 2012 14:15:52 +0000 (16:15 +0200)
buildtools/Cmake/Modules/FindF2c.cmake
buildtools/Cmake/Modules/FindGraphviz.cmake
buildtools/Cmake/Modules/FindLua51Simgrid.cmake

index 3b3ff57..29ad563 100644 (file)
@@ -61,10 +61,7 @@ mark_as_advanced(F2C_EXE)
 mark_as_advanced(HAVE_F2C_LIB)
 
 if(HAVE_F2C_H)
 mark_as_advanced(HAVE_F2C_LIB)
 
 if(HAVE_F2C_H)
-   string(REGEX MATCH "-I${HAVE_F2C_H} " operation "${CMAKE_C_FLAGS}")
-   if(NOT operation)
-               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${HAVE_F2C_H} ")
-   endif(NOT operation)
+  include_directories(${HAVE_F2C_H})
 else(HAVE_F2C_H)
        message(FATAL_ERROR "You should install f2c before use smpi.")
 endif(HAVE_F2C_H)
\ No newline at end of file
 else(HAVE_F2C_H)
        message(FATAL_ERROR "You should install f2c before use smpi.")
 endif(HAVE_F2C_H)
\ No newline at end of file
index 5d89c8f..f982b33 100644 (file)
@@ -126,20 +126,8 @@ if(HAVE_CGRAPH_LIB OR HAVE_AGRAPH_LIB)
                set(CGRAPH_H 1)
         endif(HAVE_CGRAPH_H)  
          
                set(CGRAPH_H 1)
         endif(HAVE_CGRAPH_H)  
          
-        string(REGEX MATCH "-I${file_graphviz_h} " operation "${CMAKE_C_FLAGS}")
-       if(NOT operation)
-               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${file_graphviz_h} ")
-       endif(NOT operation)
-       
-       string(REGEX MATCH "-I${file_graphviz_h}/graphviz " operation "${CMAKE_C_FLAGS}")
-       if(NOT operation)
-               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${file_graphviz_h}/graphviz ")
-       endif(NOT operation)
-       
-       string(REGEX MATCH "-L${lib_graphviz} " operation "${CMAKE_C_FLAGS}")
-       if(NOT operation)
-               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${lib_graphviz} ")
-       endif(NOT operation)
+        include_directories(${file_graphviz_h} ${file_graphviz_h}/graphviz)
+        link_directories(${lib_graphviz})
        
        set(HAVE_GRAPHVIZ "1")
     else(HAVE_GRAPH_H OR HAVE_AGRAPH_H OR HAVE_CGRAPH_H)
        
        set(HAVE_GRAPHVIZ "1")
     else(HAVE_GRAPH_H OR HAVE_AGRAPH_H OR HAVE_CGRAPH_H)
index f24aba2..fe0dd5d 100644 (file)
@@ -65,15 +65,9 @@ message(STATUS "Found Lua: ${HAVE_LUA_BIN}")
 endif(HAVE_LUA_BIN)
 
 if(LUA51_FOUND)
 endif(HAVE_LUA_BIN)
 
 if(LUA51_FOUND)
-       set(HAVE_LUA 1)
-       string(REGEX MATCH "-I${LUA_INCLUDE_DIR} " operation "${CMAKE_C_FLAGS}")
-       if(NOT operation)
-       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${LUA_INCLUDE_DIR} ")
-       endif(NOT operation)
-       string(REGEX MATCH "-L${LUA_LIBRARY_DIR} " operation "${CMAKE_C_FLAGS}")
-       if(NOT operation)
-       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${LUA_LIBRARY_DIR} ")
-       endif(NOT operation)
+  set(HAVE_LUA 1)
+  include_directories(${LUA_INCLUDE_DIR})
+  link_directories(${LUA_LIBRARY_DIR})
 else(LUA51_FOUND)
        message(STATUS "Warning : Lua need version 5.1")
 endif(LUA51_FOUND)
 else(LUA51_FOUND)
        message(STATUS "Warning : Lua need version 5.1")
 endif(LUA51_FOUND)