Skip to content

GoogleTest library should be rebuilt when changing compiler #125

@valassi

Description

@valassi

Minor issue.

I am testing gcc8 and gcc9. On a clean directory I built using gcc9: this built the tools library (GoogleTest) with gcc9. I then went back to make clean an dmake again with gcc8, but I could no longer link to the tools library.

The fix is simple: in epoch1/cuda/ee_mumu/SubProcesses/Makefile add one line

clean:
	make -C ../../src clean
	rm -f *.o *.exe
#	$(MAKE) -C $(TOOLSDIR) clean # warning: forces a new download and a new CMake configuration

The additional problem with this is that this forces make clean to wipe out everything, which means that every make will download again the GoogleTest from the web, and rerun the configure step of cmake. A build that should take seconds becomes one minute too long for my tastes. An additional improvement would be useful, changing the tools makefile so that it does not depend on a full CMake reconfigure/build every time. It would be enough to download only if absent, configure only on the first execution, and then use whatever compiler is there, without a need to rerun cmake.

Anyway: for the moment my workaround is that I build the tools library with gcc8, and this can then also be used with gcc9 executables (the contrary is not true).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions