Sharpmake icon indicating copy to clipboard operation
Sharpmake copied to clipboard

Having Project Dependencies visible on Visual Studio?

Open soufianekhiat opened this issue 2 years ago • 5 comments

Do we have a way to have Project Dependencies visible on Visual Studio, I tried AddPublicDependency and AddPrivateDependency: image

soufianekhiat avatar Aug 01 '23 21:08 soufianekhiat

Hello Soufiane,

You must be doing something wrong in your configuration because it should be working. Here is a screenshot of a msbuild based project I have that is managed by Sharpmake.

image

Are you passing special parameters to your AddPublicDependencies ? Could you paste some code here showing the way you are adding your dependencies? These are C++ projects, right ?

Thanks JS

jspelletier avatar Aug 02 '23 12:08 jspelletier

It might not be your case, but I encountered a similar case a few years ago and was also surprise at first. If your project output a static library, it does not need the results of its static dependencies to compile itself. I believe Sharpmake omit the project dependency in this case to improve compilation time. It enable the MSBuild engine to compile your projects in parallel.

sylvainfortin avatar Aug 02 '23 14:08 sylvainfortin

Hi JS,

For info, I'm using "sharpmake 0.20.0". I have nothing special:

conf.AddPublicDependency< KernelProject    >( target );
conf.AddPublicDependency< CoreProject      >( target );
conf.AddPublicDependency< MathProject      >( target );
conf.AddPublicDependency< MantleProject    >( target );
conf.AddPublicDependency< ScalerProject    >( target );
conf.AddPublicDependency< ImUIProject      >( target );

conf.AddPublicDependency< RegistersProject >( target );

All projects are C++, Core, Kernel, Math, Scalar, Mantle, ImUI, Brain, Registers, Package.SDK are static lib Package.Internal.Core is a DLL and eMVClass and eMVEditor are *.exe

soufianekhiat avatar Aug 02 '23 20:08 soufianekhiat

Hello,

In the screenshot I posted, sandbox is an exe and the 3 checked projects are static libs.

I suggest you upgrade to latest version, maybe we fixed a bug a while ago.

jspelletier avatar Aug 02 '23 20:08 jspelletier

I updated to "0.21.0" Still amazed about how fast is it compare to CMake ( :

  Results:
    projects  (  720 configurations)   131 generated,     0 up-to-date
    solutions (   10 configurations)     0 generated,     5 up-to-date
  time: 4.43 sec.

My dependencies are Kernel <- {Core, Math, eMVClass} Core <- {Scaler, Mantle, Brain, eMVClass} Math <- Brain Scaler <- Mantle Mantle <- Brain Brain <- {Registers, ImUI} Registers <- PackageSDK PackageSDK <- {PackageInternalCore, eMVEditor} PackageInternalCore <- eMVEditor

And the dependencies on the build order became: image

Dependencies for instance for Core: image

And for eMVEditor: image

Maybe I missed something.

soufianekhiat avatar Aug 05 '23 16:08 soufianekhiat