Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove old variable with_context.
[simgrid.git] / buildtools / Cmake / CompleteInFiles.cmake
index a56f753..39107f5 100644 (file)
@@ -83,8 +83,6 @@ endif(WIN32)
 
 set(CONTEXT_UCONTEXT 0)
 SET(CONTEXT_THREADS 0)
-SET(HAVE_RUBY 0)
-set(HAVE_LUA 0)
 SET(HAVE_TRACING 0)
 
 if(enable_tracing)
@@ -111,30 +109,6 @@ else(enable_model-checking AND HAVE_MMAP)
        SET(MMALLOC_WANT_OVERIDE_LEGACY 0)
 endif(enable_model-checking AND HAVE_MMAP)
 
-if(enable_lua)
-       if(LUA51_FOUND)
-               set(HAVE_LUA 1)
-               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${LUA_INCLUDE_DIR} ")
-               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${LUA_LIBRARY_DIR} ")
-       else(LUA51_FOUND)
-               message(STATUS "Warning : Lua need version 5.1")
-       endif(LUA51_FOUND)
-endif(enable_lua)
-
-#--------------------------------------------------------------------------------------------------
-### Initialize of Smpi
-
-if(enable_smpi)
-       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)
-       else(HAVE_F2C_H)
-               message(STATUS "Warning : You should install f2c before use smpi.")
-       endif(HAVE_F2C_H)       
-endif(enable_smpi)
-
 #--------------------------------------------------------------------------------------------------
 ### Initialize of CONTEXT THREADS
 
@@ -229,59 +203,28 @@ if(mcsc MATCHES "no" AND pthread)
        endif(HAVE_WINDOWS_H)
 endif(mcsc MATCHES "no" AND pthread)
 
-if(with_context MATCHES "ucontext" AND mcsc MATCHES "no")
-       message(FATAL_ERROR "-Dwith-context=ucontext specified but ucontext unusable.")
-endif(with_context MATCHES "ucontext" AND mcsc MATCHES "no")
+#Only windows
 
-set(with_context_ok 0)
-if(with_context MATCHES "windows")
-       set(with_context_ok 1)
+if(WIN32)
        if(NOT HAVE_WINDOWS_H)
                message(FATAL_ERROR "no appropriate backend found windows")
        endif(NOT HAVE_WINDOWS_H)
-endif(with_context MATCHES "windows")
-
-if(with_context MATCHES "pthreads")
-       set(with_context_ok 1)
-       set(with_context "pthread")
-endif(with_context MATCHES "pthreads")
-
-if(with_context MATCHES "auto")
-       set(with_context_ok 1)
-       set(with_context "ucontext")
-       message(STATUS "With_context auto change to ucontext")
-endif(with_context MATCHES "auto")
-
-if(with_context MATCHES "ucontext")
-       set(with_context_ok 1)
-       if(mcsc)
-               set(CONTEXT_UCONTEXT 1)
-       else(mcsc)
-               if(windows_context MATCHES "yes")
-                       set(with_context "windows")
-                       message(STATUS "With_context ucontext change to windows")
-               else(windows_context MATCHES "yes")
-                       set(with_context "pthread")
-                       message(STATUS "With_context ucontext change to pthread")
-               endif(windows_context MATCHES "yes")
-       endif(mcsc)
-endif(with_context MATCHES "ucontext")
-
-if(with_context MATCHES "pthread")
-       set(with_context_ok 1)
-       if(NOT pthread)
-               message(FATAL_ERROR "Cannot find pthreads (try -Dwith_context=ucontext if you haven't already tried).")
-       endif(NOT pthread)
-       SET(CONTEXT_THREADS 1)
-endif(with_context MATCHES "pthread")
-
-if(with_context MATCHES "ucontext")
-       SET(CONTEXT_THREADS 0)
-endif(with_context MATCHES "ucontext")
-
-if(NOT with_context_ok)
-       message(FATAL_ERROR "-Dwith-context must be either ucontext or pthread")
-endif(NOT with_context_ok)
+endif(WIN32)
+
+if(windows_context MATCHES "yes")
+       message(STATUS "Context change to windows")
+endif(windows_context MATCHES "yes")
+
+#If can have both context
+
+if(mcsc)
+       set(CONTEXT_UCONTEXT 1)
+endif(mcsc)
+
+if(pthread)
+       set(CONTEXT_THREADS 1)
+endif(pthread)
+
 
 ###############
 ## SVN version check
@@ -682,7 +625,7 @@ set(includedir ${CMAKE_INSTALL_PREFIX}/include)
 set(top_builddir ${CMAKE_HOME_DIRECTORY})
 set(libdir ${exec_prefix}/lib)
 set(CMAKE_LINKARGS "${CMAKE_CURRENT_BINARY_DIR}/lib")
-set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/lib:${gtnets_path}/lib:$LD_LIBRARY_PATH")
+set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/lib:${GTNETS_LIB_PATH}:$LD_LIBRARY_PATH")
 
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpif2c @ONLY)