Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSVSProject Error #1871

Closed
bdbaddog opened this issue Jan 2, 2018 · 0 comments
Closed

MSVSProject Error #1871

bdbaddog opened this issue Jan 2, 2018 · 0 comments

Comments

@bdbaddog
Copy link
Contributor

bdbaddog commented Jan 2, 2018

This issue was originally created at: 2007-12-28 14:33:56.
This issue was reported by: clementl.
clementl said at 2007-12-28 14:33:56

When generating dependencies for a project, some of the generated dependencies are erroneous. This was not a problem in version 0.97.0d20070809. An example pulled from a generated .vcproj:

version 0.97.0d20070809:

...
	<Files>
			<File
				RelativePath="unit_tests\library_test.cpp">
			</File>
			<File
				RelativePath="unit_tests\singleton_test.cpp">
			</File>
			<File
				RelativePath="unit_tests\test_compiler.cpp">
			</File>
		<File
			RelativePath="SConstruct">
		</File>
	</Files>
...

version 0.97.0d20071212:

...
	<Files>
			<Filter
				Name="Program Files"
				Filter="">
			<Filter
				Name="Microsoft Visual Studio 8"
				Filter="">
			<Filter
				Name="VC"
				Filter="">
			<Filter
				Name="bin"
				Filter="">
			<File
				RelativePath="C:\Program Files\Microsoft Visual Studio 8\VC\bin\lib.EXE">
			</File>
			</Filter>
			</Filter>
			</Filter>
			</Filter>
			<Filter
				Name="unit_tests"
				Filter="">
			<File
				RelativePath="unit_tests\library_test.cpp">
			</File>
			<File
				RelativePath="unit_tests\singleton_test.cpp">
			</File>
			<File
				RelativePath="unit_tests\test_compiler.cpp">
			</File>
			</Filter>
		<File
			RelativePath="SConstruct">
		</File>
	</Files>

As you can see, scons generated "C:\Program Files\Microsoft Visual Studio 8\VC\bin\lib.EXE" as a dependency, which is incorrect. I'm not quite sure how to fix it.

stevenknight said at 2007-12-28 17:53:13

The dependency on lib.exe is correct. That's the utility that's being used to generate the target, and if it changed, you would potentially need to rebuild to get an up-to-date target file.

The behavior was documented in the release notes (RELEASE.txt):

-- TARGETS NOW IMPLICITLY DEPEND ON THE COMMAND THAT BUILDS THEM

   For all targets built by calling external commands (such as a
   compiler or other utility), SCons now adds an implicit dependency
   on the command(s) used to build the target.

   This will cause rebuilds of all targets built by external commands
   when running SCons in a tree built by previous version of SCons,
   in order to update the recorded signatures.

   The old behavior of not having targets depend on the external
   commands that build them can be preserved by setting a new
   $IMPLICIT_COMMAND_DEPENDENCIES construction variable to a
   non-True value:

       env = Environment(IMPLICIT_COMMAND_DEPENDENCIES = 0)

   or by adding Ignore() calls for any targets where the behavior
   is desired:

       Ignore('/usr/bin/gcc', 'foo.o')

   Both of these settings are compatible with older versions
   of SCons.

The behavior was changed as of 0.97.0d020070809, so I'm surprised that you didn't apparently see it in that release. Nevertheless, if you don't want implicit dependencies on the commands, then set the construction variable as documented above and you should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants