msvc scripts
This commit is contained in:
BIN
build/__pycache__/amsbuildlib4.cpython-314.pyc
Normal file
BIN
build/__pycache__/amsbuildlib4.cpython-314.pyc
Normal file
Binary file not shown.
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user