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

cmake --target takes one argument, not two #105

Merged
merged 1 commit into from
Nov 3, 2021
Merged

Conversation

Habbie
Copy link
Contributor

@Habbie Habbie commented Nov 3, 2021

It is possible I misunderstood the intent of the two targets on the line, but running these two commands gives me those two targets built.

@zeux
Copy link
Collaborator

zeux commented Nov 3, 2021

Using both targets in a single invocation should build both of them at once. Does that not work for you? This is copied from our CI scripts, although they build a different config:

cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI --config Debug # match config with tests to improve build time

@Habbie
Copy link
Contributor Author

Habbie commented Nov 3, 2021

$  cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI --config RelWithDebInfo
Unknown argument Luau.Analyze.CLI
Usage: cmake --build <dir> [options] [-- [native-options]]
Options:
  <dir>          = Project binary directory to be built.
  -j [<jobs>] --parallel [<jobs>] = Build in parallel using
                   the given number of jobs. If <jobs> is omitted
                   the native build tool's default number is used.
                   The CMAKE_BUILD_PARALLEL_LEVEL environment variable
                   specifies a default parallel level when this option
                   is not given.
  --target <tgt> = Build <tgt> instead of default targets.
                   May only be specified once.
  --config <cfg> = For multi-configuration tools, choose <cfg>.
  --clean-first  = Build target 'clean' first, then build.
                   (To clean only, use --target 'clean'.)
  --use-stderr   = Ignored.  Behavior is default in CMake >= 3.0.
  --             = Pass remaining options to the native tool.

This is cmake 3.13.4-1 on Debian 10/amd64. The manpage mentions this:

       --target <tgt>
              Build <tgt> instead of default targets.  May only be specified once.

@zeux
Copy link
Collaborator

zeux commented Nov 3, 2021

Looks like support for multiple targets has been added in CMake 3.15. I don't think we're using any modern features, so it would make sense to update the README to account for that.

Copy link
Collaborator

@zeux zeux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@zeux zeux merged commit 3f0eb42 into luau-lang:master Nov 3, 2021
@Habbie
Copy link
Contributor Author

Habbie commented Nov 3, 2021

Thanks!

You're welcome, thanks for the quick turnaround!

@Habbie Habbie deleted the patch-1 branch November 3, 2021 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants