Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,926
    • Issues 3,926
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #20135
Closed
Open
Created Dec 28, 2019 by jannick0@jannick0Contributor

add_test: dependency to called exe built by add_executable / definition of ARGS in Makefile's test rule

The overall make rule associated to add_test(...) essentially looks like

ctest.exe --force-new-ctest-process $(ARGS).

Is it possible to

  • define ARGS in CMakeLists.txt on a test-by-test basis?
  • to automatically add a dependency (target-exe <- test(exe)) if a test runs an exe built by an add_executable target (with target name, say, target-exe)? I realized that in CMakeTests.txt target-exe is replaced by the full path to the exe.
  • add the feature to optionally add to add_test a cmake target - as opposed to a ctest name - which should be updated if needed before running the test?

Hopefully I did not miss something obvious in the documentation.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking