msvc scripts

This commit is contained in:
2026-06-03 10:13:28 -04:00
parent fa09e3be9c
commit 4356f3eacf
71 changed files with 2705 additions and 10 deletions

Binary file not shown.

View File

@ -17,7 +17,7 @@ builddir = "./build_msvc64"
doinstall = True #copies the build_output to the install dir when finished
cc = "nvcc" #compiler
#cflags = "-dc --compiler-options '-fPIC -O3'"
cflags = "-dc -Xcompiler -fPIC -Xcompiler -O3"
cflags = "-dc -Xcompiler /O2"
libraries = "-l{}".format(libname)
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
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
kwargs = dict()
include = "-I./include -I{}/include -I{}/include".format(commondir, depdir)
include = "-I./include -I{}/include".format(commondir)
kwargs["include"] = include
kwargs["flags"] = cflags
kwargs["libdir"] = libdirs
@ -45,7 +45,7 @@ srcfiles = except_contains(srcfiles,binsrc)
#compile all the source files in the list
#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
objlist = flist(kwargs['objstore'],exts='.obj',recurse=True)

View File

@ -17,10 +17,10 @@ builddir = "./build_msvc64"
doinstall = False #copies the build_output to the install dir when finished
cc = "nvcc" #compiler
#cflags = "-dc --compiler-options '-fPIC -O3'"
cflags = "-dc -Xcompiler -fPIC -Xcompiler -O3"
libraries = "-l{}".format(libname)
cflags = "-dc -Xcompiler /O2"
libraries = "-llib{}".format(libname)
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
linkerflags = " -Xlinker=-rpath,."
linkerflags = ""
srcexts = [".c",".cpp",".cu"]
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["objstore"] = "{}/objstore".format(builddir)
kwargs["searchincdirs"] = "./include"
kwargs["objext"] = ".obj"
#Pull required binary dynamic libraries to the bin folder
#shutil.copy('{}/lib/libcamsimg3.linux64.so'.format(commondir),builddir);
@ -42,9 +43,9 @@ kwargs["searchincdirs"] = "./include"
#shutil.copy('{}/lib/glew32.dll','./bin_winx64');
#Designate source files for main test program
fsrc = ['./src/main.cpp']
fsrc = ['./src/main.cu']
fobj = replaceexts(fsrc,'.obj')
#Compile test programs
msvc_compile_list(cc,fsrc,**kwargs)
msvc_link_list(list_to_sss(fobj),'{}/{}'.format(builddir,binname),**kwargs)
gs_compile_list(cc,fsrc,**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.

2665
build_msvc64/dump.txt Normal file

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.

BIN
build_msvc64/test.exe Normal file

Binary file not shown.

BIN
build_msvc64/test.exp Normal file

Binary file not shown.

BIN
build_msvc64/test.lib Normal file

Binary file not shown.

View File

@ -53,7 +53,7 @@ template<typename T> __device__ __host__ int cuarray<T>::resize(const int _lengt
}
int I;
T def;
T def = T();
if(data!=NULL)
{

View File

@ -13,6 +13,7 @@
#include <thread>
#include <functional>
#include <mutex>
#include <vector>
#include <cuda_runtime_api.h> //where all the cuda functions live
#include <cuda_runtime.h>

28
make_msvc.py Normal file
View File

@ -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('..')