Closed markspacehub closed 1 week ago
Hi @markspacehub, thanks for taking the time to report your issue
As with every cli_args
argument in the CMake integrations, this argument expects a list of strings to pass to cmake, not a string with all the arguments already joined. It is true that the documentation for the method could be improved a tad to clear this confussion up, will update it when possible!
Let me know if this helps :)
Ahhh yes I see further up other cli_args have more detail or "same as above" written. Converting to:
meant the correct command was called and the tests executed.
Thanks!
Describe the bug
OS Ubuntu 24.04 Conan Profile: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu17 compiler.libcxx=libstdc++11 compiler.version=13 os=Linux
Conan version = 2.4.1 CMake version = 3.28.3
When using cmake.ctest(cli_args="foobar") the output on the console is incorrect. The arguments have a space between each letter inserted, which prevents them from doing anything. Examples shown below:
in conanfile.py:![image](https://github.com/conan-io/conan/assets/163284842/3f42d0da-49bb-44d4-9217-690a55eac979)
output on the command line:![image](https://github.com/conan-io/conan/assets/163284842/a794e39e-409d-4269-a904-a6738bb099d0)
The two cmake.ctest commands output their cli_args with spaces in the words and no tests are found (they should be in ./tests). below that an ls command is issued which shows that there is a tests folder. Finally I have manually run the ctest command on line 69. The console shows the desired output and the start of the tests.
The cmake.ctest command is doing something funky and is unusable for me!
How to reproduce it
No response