Skip to content

Conversation

@tobil4sk
Copy link
Member

If the current target does not produce a file, the -Ddestination flag is currently ignored without warning.

This situation may occur commonly when 'default' points to another target, but doesn't produce a file itself. A warning will now be displayed:

Warning: Target 'default' does not output a file, so 'destination' has been ignored

If the current target does not produce a file, the -Ddestination flag is
currently ignored without warning.

This situation may occur commonly when 'default' points to another
target, but doesn't produce a file itself. A warning will now be
displayed:

Warning: Target 'default' does not output a file, so 'destination' has
been ignored
@Simn
Copy link
Member

Simn commented Jan 23, 2025

I'm having a hard time making sense of that sentence, but I suppose that's because I lack context.

@tobil4sk
Copy link
Member Author

Suppose you have a Build.xml like this:

<xml>

	<files id="main">
		<file name="main.c" />
	</files>

	<target id="main" output="main${EXE}" tool="linker" toolid="exe">
		<files id="main" />
	</target>

	<target id="default">
		<target id="main" />
	</target>

</xml>

The file has two targets, main which compiles a file, and default which just runs the main target (Haxe cpp gen produces a default and haxe target like this). -Ddestination is used to copy the output of a single target to a given file path.

Right now, if you use the default target (which hxcpp uses by default), the -Ddestination flag does not do anything since default does not produce an output file. The warning is meant to notify the user of this.

@Simn Simn merged commit fa83d19 into HaxeFoundation:master Jan 23, 2025
116 of 120 checks passed
@tobil4sk tobil4sk deleted the fix/warn-no-output-destination branch January 23, 2025 14:21
charlesisfeline pushed a commit to charlesisfeline/hxcpp that referenced this pull request Mar 26, 2025
If the current target does not produce a file, the -Ddestination flag is
currently ignored without warning.

This situation may occur commonly when 'default' points to another
target, but doesn't produce a file itself. A warning will now be
displayed:

Warning: Target 'default' does not output a file, so 'destination' has
been ignored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants