msvc scripts
This commit is contained in:
Binary file not shown.
@@ -17,7 +17,7 @@ builddir = "./build_msvc64"
|
|||||||
doinstall = True #copies the build_output to the install dir when finished
|
doinstall = True #copies the build_output to the install dir when finished
|
||||||
cc = "nvcc" #compiler
|
cc = "nvcc" #compiler
|
||||||
#cflags = "-dc --compiler-options '-fPIC -O3'"
|
#cflags = "-dc --compiler-options '-fPIC -O3'"
|
||||||
cflags = "-dc -Xcompiler -fPIC -Xcompiler -O3"
|
cflags = "-dc -Xcompiler /O2"
|
||||||
libraries = "-l{}".format(libname)
|
libraries = "-l{}".format(libname)
|
||||||
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
|
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
|
||||||
linkerflags = " -Xlinker=-rpath,."
|
linkerflags = " -Xlinker=-rpath,."
|
||||||
@@ -27,7 +27,7 @@ binsrc = ["main.c","main.cpp","main.cu"] #ignore these files when compiling the
|
|||||||
|
|
||||||
#keyword list to control the compilers/linkers
|
#keyword list to control the compilers/linkers
|
||||||
kwargs = dict()
|
kwargs = dict()
|
||||||
include = "-I./include -I{}/include -I{}/include".format(commondir, depdir)
|
include = "-I./include -I{}/include".format(commondir)
|
||||||
kwargs["include"] = include
|
kwargs["include"] = include
|
||||||
kwargs["flags"] = cflags
|
kwargs["flags"] = cflags
|
||||||
kwargs["libdir"] = libdirs
|
kwargs["libdir"] = libdirs
|
||||||
@@ -45,7 +45,7 @@ srcfiles = except_contains(srcfiles,binsrc)
|
|||||||
|
|
||||||
#compile all the source files in the list
|
#compile all the source files in the list
|
||||||
#gs_compile_list(cc,files,**kwargs)
|
#gs_compile_list(cc,files,**kwargs)
|
||||||
msvc_incremental_compile_list(cc,srcfiles,**kwargs)
|
gs_incremental_compile_list(cc,srcfiles,**kwargs)
|
||||||
|
|
||||||
#archive all the source files into a static library
|
#archive all the source files into a static library
|
||||||
objlist = flist(kwargs['objstore'],exts='.obj',recurse=True)
|
objlist = flist(kwargs['objstore'],exts='.obj',recurse=True)
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ builddir = "./build_msvc64"
|
|||||||
doinstall = False #copies the build_output to the install dir when finished
|
doinstall = False #copies the build_output to the install dir when finished
|
||||||
cc = "nvcc" #compiler
|
cc = "nvcc" #compiler
|
||||||
#cflags = "-dc --compiler-options '-fPIC -O3'"
|
#cflags = "-dc --compiler-options '-fPIC -O3'"
|
||||||
cflags = "-dc -Xcompiler -fPIC -Xcompiler -O3"
|
cflags = "-dc -Xcompiler /O2"
|
||||||
libraries = "-l{}".format(libname)
|
libraries = "-llib{}".format(libname)
|
||||||
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
|
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
|
||||||
linkerflags = " -Xlinker=-rpath,."
|
linkerflags = ""
|
||||||
srcexts = [".c",".cpp",".cu"]
|
srcexts = [".c",".cpp",".cu"]
|
||||||
binsrc = ["main.c","main.cpp","main.cu"] #ignore these files when compiling the static library
|
binsrc = ["main.c","main.cpp","main.cu"] #ignore these files when compiling the static library
|
||||||
|
|
||||||
@@ -35,6 +35,7 @@ kwargs["linkerflags"] = linkerflags
|
|||||||
kwargs["recurse"] = True
|
kwargs["recurse"] = True
|
||||||
kwargs["objstore"] = "{}/objstore".format(builddir)
|
kwargs["objstore"] = "{}/objstore".format(builddir)
|
||||||
kwargs["searchincdirs"] = "./include"
|
kwargs["searchincdirs"] = "./include"
|
||||||
|
kwargs["objext"] = ".obj"
|
||||||
|
|
||||||
#Pull required binary dynamic libraries to the bin folder
|
#Pull required binary dynamic libraries to the bin folder
|
||||||
#shutil.copy('{}/lib/libcamsimg3.linux64.so'.format(commondir),builddir);
|
#shutil.copy('{}/lib/libcamsimg3.linux64.so'.format(commondir),builddir);
|
||||||
@@ -42,9 +43,9 @@ kwargs["searchincdirs"] = "./include"
|
|||||||
#shutil.copy('{}/lib/glew32.dll','./bin_winx64');
|
#shutil.copy('{}/lib/glew32.dll','./bin_winx64');
|
||||||
|
|
||||||
#Designate source files for main test program
|
#Designate source files for main test program
|
||||||
fsrc = ['./src/main.cpp']
|
fsrc = ['./src/main.cu']
|
||||||
fobj = replaceexts(fsrc,'.obj')
|
fobj = replaceexts(fsrc,'.obj')
|
||||||
|
|
||||||
#Compile test programs
|
#Compile test programs
|
||||||
msvc_compile_list(cc,fsrc,**kwargs)
|
gs_compile_list(cc,fsrc,**kwargs)
|
||||||
msvc_link_list(list_to_sss(fobj),'{}/{}'.format(builddir,binname),**kwargs)
|
gs_link_list(cc,list_to_sss(fobj),'{}/{}'.format(builddir,binname),**kwargs)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -53,7 +53,7 @@ template<typename T> __device__ __host__ int cuarray<T>::resize(const int _lengt
|
|||||||
}
|
}
|
||||||
|
|
||||||
int I;
|
int I;
|
||||||
T def;
|
T def = T();
|
||||||
|
|
||||||
if(data!=NULL)
|
if(data!=NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include <cuda_runtime_api.h> //where all the cuda functions live
|
#include <cuda_runtime_api.h> //where all the cuda functions live
|
||||||
#include <cuda_runtime.h>
|
#include <cuda_runtime.h>
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
import os,sys,math
|
||||||
|
from build.amsbuildlib4 import *
|
||||||
|
|
||||||
|
if(len(sys.argv)>=2):
|
||||||
|
if(sys.argv[1]=="clean"):
|
||||||
|
obj_list = flist('./build_msvc64',recurse=True,exts=['.obj'])
|
||||||
|
for o in obj_list:
|
||||||
|
os.remove('{}'.format(o))
|
||||||
|
exit()
|
||||||
|
|
||||||
|
os.system('python3 ./build/make.msvc64.lib.py')
|
||||||
|
os.system('python3 ./build/make.msvc64.test.py')
|
||||||
|
|
||||||
|
obj_list = flist('./src',recurse=True,exts=['.o','.obj'])
|
||||||
|
for o in obj_list:
|
||||||
|
os.remove('{}'.format(o))
|
||||||
|
|
||||||
|
if(sys.platform!="win32"):
|
||||||
|
os.chdir('./build_msvc64')
|
||||||
|
callproc('wine ./test.exe')
|
||||||
|
os.chdir('..')
|
||||||
|
else:
|
||||||
|
os.chdir('./build_msvc64')
|
||||||
|
callproc('test.exe')
|
||||||
|
os.chdir('..')
|
||||||
Reference in New Issue
Block a user