Hi,
I was trying to migrate my environment to CMAKE to use GCC compiler with VS.
Previously I are using make script.
Can any one support me on how to generate the below make command in the CMAKE script. In the below make command we are generating the .a .dll and stripped .a and .dll
type $(OUTDIR)/$(PROJ).dll: $(OBJECTS)
@$(ECHO) Linking and locating to $(PROJ).dll
@$(BINDIR)/gcc -shared -Wl,-Map=$(OUTDIR)/$(PROJ).map -o$(OUTDIR)/$(PROJ).dll $(OPT_LC) @objects.txt
@$(BINDIR)/strip -s -o $(OUTDIR)/$(PROJ)_stripped.dll $(OUTDIR)/$(PROJ).dll
$(OUTDIR)/$(PROJ).a: $(OBJECTS)
@$(ECHO) Creating $(PROJ).a
@$(shell $(RM) -f $(OUTDIR)/$(PROJ).a)
@$(BINDIR)/ar r $(OUTDIR)/$(PROJ).a @objects.txt
@$(BINDIR)/strip -g -X -x -o $(OUTDIR)/$(PROJ)_stripped.a $(OUTDIR)/$(PROJ).aor paste code here
CMake tends to strip on the install step rather than right after linking. However, you can use add_custom_command(POST_LINK) to do post-link steps like this (though I don’t think CMake exposes any “how to strip a library” abstraction to make it really easy).
I was using Visual Studio is it possible to to install it in VS.?
If it is a CLI I hope that would be straightforward. I am not sure weather it comes by default with VS or we need to install it manually