Sharpmake is an open-source C#-based solution for generating project definition files, such as Visual Studio projects and solutions, GNU makefiles, Xcode projects, etc.
Apache License 2.0
945
stars
171
forks
source link
Fix CustomFileBuildStep not working with static libraries under FastBuild #204
CustomFileBuildStep targets were not being added to .PreBuildDependencies of Library() in BFF, only to Executable() and DLL(). Issue was only affecting FastBuild and not MSBuild. Added functional test cases for FastBuild that check if CustomFileBuildStep is working for all three types of projects.
We initially built our project using Sharpmake with MSBuild and this was one of the first issues that we encountered when we started transitioning to FastBuild.
Modifications to functional tests currently rely on Windows/MSVC because:
Windows command prompt is invoked to call copy command to imitate simple CustomFileBuildStep
Function is exported using __declspec(dllexport) attribute to make sure LIB file is created with DLL
It seems that functional tests are only run on Windows (at least in CI), so please let me know if functional tests need to be able to run on other platforms.
I am not 100% sure if PostResolve is the best place to have logic for adding CustomFileBuildStep. I didn't use ConfigureAll because we need populated ResolvedSourceFiles here. Please advise if there is a better way. :)
We initially built our project using Sharpmake with MSBuild and this was one of the first issues that we encountered when we started transitioning to FastBuild.
Modifications to functional tests currently rely on Windows/MSVC because:
copy
command to imitate simple CustomFileBuildStep__declspec(dllexport)
attribute to make sure LIB file is created with DLLIt seems that functional tests are only run on Windows (at least in CI), so please let me know if functional tests need to be able to run on other platforms.
I am not 100% sure if
PostResolve
is the best place to have logic for adding CustomFileBuildStep. I didn't useConfigureAll
because we need populatedResolvedSourceFiles
here. Please advise if there is a better way. :)Thanks!