Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill ancient files which were used back in the age to compile with windows, and add...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 2 Dec 2010 14:04:24 +0000 (14:04 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 2 Dec 2010 14:04:24 +0000 (14:04 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8889 48e7efb5-ca39-0410-a469-dd3cf9ba447f

SimGridConfig.js [deleted file]
TeshConfig.js [deleted file]
toolchain.win32 [new file with mode: 0644]

diff --git a/SimGridConfig.js b/SimGridConfig.js
deleted file mode 100644 (file)
index 9ab4a6b..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-// SimGrid configuration file for Windows.\r
-// Register all environement variables needed for the compilation of SimGrid library\r
-// and all the tesh suite, examples and test suites.\r
-\r
-\r
-// FIXME declare the include directory in the environment of the compilation.\r
-\r
-// Test if the string s is in the array a.\r
-function ArrayContains(a, s)\r
-{\r
-       var i = 0;\r
-       \r
-       for(i = 0; i < a.length; i++)\r
-               if(a[i] == s)\r
-                       return true;\r
-                        \r
-       return false;           \r
-}\r
-\r
-// SimGrid configuration file for Windows.\r
-// Register all environement variables needed for the compilation of SimGrid library\r
-// and all the tesh suite, examples and test suites.\r
-\r
-var Shell;\r
-var UserEnv;\r
-var FileSystem;\r
-\r
-\r
-var DebugLibraryPath;          // The path of the SimGrid debug library\r
-var ReleaseLibraryPath;                // The path of the SimGrid release library\r
-\r
-var Lib;                                       // The value of the environment variable LIB\r
-var Include;                           // The value of the environment variable INCLUDE\r
-var Libs;                                      // SimGrid library name (the value of the environment variable LIBS).\r
-\r
-\r
-var VCInstallDir;                      // Visual C install directory\r
-var SGBuildDir;                                // This build directory\r
-var JNIIncludeDir;                     // The path of the jni.h header\r
-\r
-var Args = WScript.Arguments;\r
-\r
-// check the arguments to be sure it's right\r
-if (Args.Count() < 3)\r
-{\r
-   WScript.Echo("SimGrid Configuration.");\r
-   WScript.Echo("Configure the environment of the compilation of SimGrid library");\r
-   WScript.Echo("\n\tUsage: CScript SimGridConfig.js <SGBuildDir> <VCInsallDir> <JNIIncludeDir>");\r
-   WScript.Quit(1);\r
-}\r
-\r
-SGBuildDir = Args.Item(0);\r
-VCInstallDir = Args.Item(1);\r
-JNIIncludeDir = Args.Item(2); \r
-\r
-var FileSystem = new ActiveXObject("Scripting.FileSystemObject");\r
-\r
-// Build the 2 paths of SimGrid library paths (debug and release)\r
-ReleaseLibraryPath = SGBuildDir + "build\\vc7\\simgrid\\Release";\r
-DebugLibraryPath = SGBuildDir + "build\\vc7\\simgrid\\Debug";\r
-\r
-// Check the directories specified as parameters of the script.\r
-\r
-if(!FileSystem.FolderExists(SGBuildDir))\r
-{\r
-       WScript.Echo("Not a directory `(" + SGBuildDir + ")'"); \r
-       WScript.Quit(2);\r
-}\r
-else if(!FileSystem.FolderExists(VCInstallDir))\r
-{\r
-       WScript.Echo("Not a directory `(" + VCInstallDir + ")'");       \r
-       WScript.Quit(3);\r
-}\r
-else if(!FileSystem.FolderExists(JNIIncludeDir))\r
-{\r
-       WScript.Echo("Not a directory `(" + JNIIncludeDir + ")'");      \r
-       WScript.Quit(5);\r
-}\r
-\r
-Shell = WScript.CreateObject("Wscript.Shell");\r
-UserEnv = Shell.Environment("USER");\r
-\r
-WScript.Echo("Configuration of SimGrig Library Compilation in progress...");\r
-WScript.Echo("Build directory : " + SGBuildDir);       \r
-WScript.Echo("Visual C install directory : " + VCInstallDir);\r
-WScript.Echo("Java Native Interface include directory : " + JNIIncludeDir);\r
-\r
-\r
-// Build the content of the environment variable LIB.\r
-Lib = UserEnv("LIB");\r
-\r
-if(typeof(UserEnv("LIB")) != "undefined" && Lib.length > 0)\r
-{\r
-       var a = Lib.split(";");\r
-       \r
-       if(!ArrayContains(a,DebugLibraryPath))\r
-               Lib = Lib + DebugLibraryPath + ";";;\r
-               \r
-        if(!ArrayContains(a,ReleaseLibraryPath))\r
-               Lib = Lib +  ReleaseLibraryPath + ";";\r
-               \r
-       if(!ArrayContains(a, VCInstallDir + "lib"))\r
-               Lib = Lib +  VCInstallDir + "lib" + ";";\r
-               \r
-       if(!ArrayContains(a, VCInstallDir + "PlatformSDK\\Lib"))\r
-               Lib = Lib +  VCInstallDir + "PlatformSDK\\Lib" + ";";   \r
-}\r
-else\r
-{\r
-       // SimGrid librairy paths\r
-        Lib = DebugLibraryPath + ";";\r
-        Lib = Lib + ReleaseLibraryPath + ";";\r
-        // Visual C library paths.\r
-        Lib = Lib + VCInstallDir + "lib" + ";";\r
-        Lib = Lib + VCInstallDir + "PlatformSDK\\Lib" + ";";\r
-               \r
-}\r
-\r
-// Build the content of the environment variable INCLUDE.\r
-Include = UserEnv("INCLUDE");\r
-\r
-if(typeof(UserEnv("INCLUDE")) != "undefined" && Include.length > 0)\r
-{\r
-       \r
-       var a = Include.split(";");\r
-       \r
-       // Add the Visual C include directories\r
-       if(!ArrayContains(a, VCInstallDir + "include"))\r
-               Include = Include + VCInstallDir + "include" + ";";\r
-               \r
-       if(!ArrayContains(a,VCInstallDir + "PlatformSDK\\include"))\r
-               Include = Include +  VCInstallDir + "PlatformSDK\\include" + ";";\r
-       \r
-       \r
-       // Add the SimGrid include directories\r
-       if(!ArrayContains(a,SGBuildDir + "src"))\r
-               Include = Include + SGBuildDir + "src" + ";";\r
-               \r
-       if(!ArrayContains(a,SGBuildDir + "include"))\r
-               Include = Include + SGBuildDir + "include" + ";";\r
-               \r
-       if(!ArrayContains(a,SGBuildDir + "src\\include"))\r
-               Include = Include + SGBuildDir + "src\\include" + ";";\r
-               \r
-       // Add the JNI include directories.\r
-       if(!ArrayContains(a,JNIIncludeDir))\r
-               Include = Include +  JNIIncludeDir + ";";\r
-               \r
-       if(!ArrayContains(a,JNIIncludeDir + "awin32"))\r
-               Include = Include + JNIIncludeDir + "win32" + ";";\r
-       \r
-}\r
-else\r
-{\r
-       // Visual C include directories\r
-       Include = VCInstallDir + "include" + ";";\r
-       Include = Include + VCInstallDir + "PlatformSDK\\include" + ";";\r
-       // SimGrid include directories.\r
-       Include = Include + SGBuildDir + "src" + ";";\r
-       Include = Include + SGBuildDir + "include" + ";" ;\r
-       Include = Include + SGBuildDir + "src\\include" + ";";\r
-       // JNI include directories.\r
-       Include = Include + JNIIncludeDir + ";";\r
-       Include = Include + JNIIncludeDir + "win32" + ";";\r
-        \r
-}\r
-\r
-// Build the content of the environment variable LIBS.\r
-Libs = UserEnv("LIBS");\r
-\r
-if(typeof(UserEnv("LIBS")) != "undefined" && Libs.length > 0)\r
-{\r
-       var a = Libs.split(";");\r
-       \r
-       if(!ArrayContains(a, "simgrid.lib"))\r
-               Libs = Libs + "simgrid.lib" + ";";\r
-}\r
-else\r
-{\r
-       Libs = "simgrid.lib" + ";";\r
-}\r
-\r
-// Update the environment variables.\r
-UserEnv("LIB") = Lib;\r
-UserEnv("INCLUDE") = Include;\r
-UserEnv("LIBS") = Libs;\r
-\r
-\r
-\r
-WScript.Echo("Configuration successeded");\r
diff --git a/TeshConfig.js b/TeshConfig.js
deleted file mode 100644 (file)
index 8105290..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-// Tesh configuration file for Windows.
-// Register all environement variables needed by Tesh
-// during its compilation and during the running of Tesh files.
-
-
-// Test if the string s is in the array a.
-function ArrayContains(a, s)
-{
-       var i = 0;
-       
-       for(i = 0; i < a.length; i++)
-               if(a[i] == s)
-                       return true;
-                        
-       return false;           
-}
-
-// SimGrid configuration file for Windows.
-// Register all environement variables needed for the compilation of SimGrid library
-// and all the tesh suite, examples and test suites.
-
-var Shell;
-var UserEnv;
-var FileSystem;
-
-var SGBuildDir;                                // This build directory
-var TeshDir;
-var TeshExampleDir;
-var TeshSuiteDir;
-var TestSuiteDir;
-var ExampleDir;
-var SrcDir;
-
-var Path;
-var Include;
-
-var Args = WScript.Arguments;
-
-// check the arguments to be sure it's right
-if (Args.Count() < 1)
-{
-   WScript.Echo("Tesh Configuration.");
-   WScript.Echo("Configure the environment of Tesh (mini test shell)");
-   WScript.Echo("\n\tUsage: CScript TeshConfig.js <SGBuildDir> <TeshVersion>");
-   WScript.Quit(1);
-}
-
-SGBuildDir = Args.Item(0);
-TeshVersion = Args.Item(1);
-
-var FileSystem = new ActiveXObject("Scripting.FileSystemObject");
-
-// Check the directories specified as parameters of the script.
-
-if(!FileSystem.FolderExists(SGBuildDir))
-{
-       WScript.Echo("Not a directory `(" + SGBuildDir + ")'"); 
-       WScript.Quit(2);
-}
-
-
-
-// Build the directories
-
-TeshDir = SGBuildDir + "tools\\tesh" + TeshVersion;
-TeshExampleDir = TeshDir + "\\examples";
-TeshSuiteDir = SGBuildDir + "teshsuite";
-TestSuiteDir = SGBuildDir + "testsuite";
-ExampleDir =  SGBuildDir + "examples";
-SrcDir = ExampleDir + "\\msg";
-
-
-Shell = WScript.CreateObject("Wscript.Shell");
-UserEnv = Shell.Environment("USER");
-
-WScript.Echo("Configuration of Tesh Library Compilation in progress...");
-WScript.Echo("Build directory : " + SGBuildDir);
-
-
-// Include Tesh in the Path
-Path = UserEnv("PATH");
-
-if(typeof(UserEnv("PATH")) != "undefined" && Path.length > 0)
-{
-       var a = Path.split(";");
-       
-       // Add the Visual C include directories
-       if(!ArrayContains(a, TeshDir))
-               Path = Path + TeshDir + ";";
-}
-else
-{
-       Path = TeshDir + ";";
-}
-
-Include = UserEnv("INCLUDE");
-
-if(typeof(UserEnv("INCLUDE")) != "undefined" && Include.length > 0)
-{
-       var a = Include.split(";");
-       
-       // Add the Visual C include directories
-       if(!ArrayContains(a, TeshDir + "\\include"))
-               Include = Include + TeshDir + "\\include" + ";";
-               
-       if(!ArrayContains(a, TeshDir + "\\w32\\include"))
-               Include = Include + TeshDir + "\\w32\\include" + ";";
-}
-else
-{
-       Include = TeshDir + "\\include";
-       Include = Include + ";" + TeshDir + "\\w32\\include" + ";";
-}
-
-// Build environement of Tesh.
-UserEnv("TESH") = "tesh";
-UserEnv("TESH_DIR") = TeshDir;
-UserEnv("TESHEXAMPLE_DIR") = TeshExampleDir;
-UserEnv("TESHSUITE_DIR") = TeshSuiteDir;
-UserEnv("TESTSUITE_DIR") = TestSuiteDir;
-UserEnv("EXAMPLE_DIR") = ExampleDir;
-UserEnv("SRCDIR") = SrcDir;
-UserEnv("INCLUDE") = Include;
-
-
-UserEnv("PATH") = Path;
-
-
-WScript.Echo("Configuration successeded");
diff --git a/toolchain.win32 b/toolchain.win32
new file mode 100644 (file)
index 0000000..9957143
--- /dev/null
@@ -0,0 +1,30 @@
+# This is an experimental toolchain file for cmake, to use when you
+# want to cross compile from linux to windows. For that, you'll need
+# some packages like mingw32-binutils and mingw32-runtime. 
+
+# Then, you want to use those commands to cross compile out of source:
+# cd win32
+# cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain.win32 -Dwith_context=windows ..
+
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+SET(WIN32 1)
+
+# Manual setting of values that are detected when not cross-compiling
+SET(SIZEOF_MAX 8)
+SET(GRAS_THISARCH 3) # FIXME: that's windows 32 bits, 64bits must be detected
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
+SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH  /usr/i586-mingw32msvc)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search 
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)