Moved no-as-needed flag to link rule.
Avoids link errors for tests linked with nvcc.
This commit is contained in:
parent
0d4f8f4e95
commit
03df4c7759
4
Makefile
4
Makefile
@ -50,7 +50,7 @@ NVCUFLAGS += -Xptxas -v -Xcompiler -Wall,-Wextra
|
||||
CXXFLAGS += -Wall -Wextra
|
||||
endif
|
||||
|
||||
LDFLAGS := -Wl,--no-as-needed -L$(CUDA_HOME)/lib64 -lcudart
|
||||
LDFLAGS := -L$(CUDA_HOME)/lib64 -lcudart
|
||||
MPIFLAGS := -I$(MPI_HOME)/include -L$(MPI_HOME)/lib -lmpi
|
||||
TSTINC := -Ibuild/include -Itest/include
|
||||
|
||||
@ -88,7 +88,7 @@ lib : $(INCTARGETS) $(LIBDIR)/$(LIBTARGET)
|
||||
$(LIBDIR)/$(LIBTARGET) : $(LIBOBJ)
|
||||
@printf "Linking %-25s\n" $@
|
||||
@mkdir -p $(LIBDIR)
|
||||
@$(GPP) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(LIBSONAME) -o $@ $(LDFLAGS) $(LIBOBJ)
|
||||
@$(GPP) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,--no-as-needed -Wl,-soname,$(LIBSONAME) -o $@ $(LDFLAGS) $(LIBOBJ)
|
||||
@ln -sf $(LIBSONAME) $(LIBDIR)/$(LIBNAME)
|
||||
@ln -sf $(LIBTARGET) $(LIBDIR)/$(LIBSONAME)
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#define SRC_TEST_UTILITIES_H_
|
||||
|
||||
#include <curand.h>
|
||||
#include <string>
|
||||
|
||||
#define CUDACHECK(cmd) do { \
|
||||
cudaError_t e = cmd; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user