Here is the details from my exercism troubleshoot call
Troubleshooting Information
===========================
Version
----------------
Current: 3.5.4
Latest: 3.5.4
Operating System
----------------
OS: darwin
Architecture: amd64
Configuration
----------------
Home: /Users/my_user
Workspace: /Users/my_user/Source/exercism
Config: /Users/my_user/.config/exercism
API key: 6415*****************************551
API Reachability
----------------
GitHub:
* https://api.github.com
* [connected]
* 206.684209ms
Exercism:
* https://api.exercism.org/v1/ping
* [connected]
* 631.14275ms
If you are having trouble, please create a new topic in the Exercism forum
at https://forum.exercism.org/c/support/cli/10 and include
this information.
This is what I get when I call the test
exercism t
Running tests via `make`
make: *** No targets specified and no makefile found. Stop.
I have tried calling cmake -G Xcode, cmake -G Xcode . and mkdir build && cd build && cmake -G Xcode .. before I run the test and still I get the same error.
I tried working with members of the discord to resolve, but so far have been unable to resolve
Testing on my own system (MacBook Air M2, Sequoia 15.0), it seems that exercism t (exercism test) is not compatible with the C++ track. Recommend trying mkdir -p build && cd build && cmake -G Xcode .. && make from the exercise base directory
Thanks for this, Thought I tried and the results are as follows
mkdir -p build && cd build && cmake -G Xcode .. && make
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/my_user/Source/exercism/cpp/lasagna
make: *** No targets specified and no makefile found. Stop.
I was able to solve this and get it running with the exercism cli. Here are the steps that I took.
Using the example that @neenjaw provided in the Discord thread which was
cmake -G "Unix Makefiles" ..
I was able to build and run the application. because the exercise cli required the JSON in the root directory it is unable to be run in either the build directory or see the actual build in the build directory. SO instead I used the following in the root directory
cmake -G "Unix Makefiles" .
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (1.0s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/my_user/Source/exercism/cpp/lasagna
Then after this is done I can either run make or even better, I can run exercise t or exercise test and get the result below
exercism t
Running tests via `make`
[ 33%] Building CXX object CMakeFiles/lasagna.dir/lasagna_test.cpp.o
[ 66%] Linking CXX executable lasagna
[100%] Built target lasagna
===============================================================================
All tests passed (1 assertion in 1 test case)
[100%] Built target test_lasagna
It sounds like when running the Xcode project you’re unable to use the make command on the resulting project. However, when using the unix Makefiles it works.
I can even run the app directly
./lasagna
===============================================================================
All tests passed (1 assertion in 1 test case)
It would be great if we could add something about this into the C++ documentation and instructions for the CLI or I don’t know if it is possible make a change to the exercism CLI such that it is able to process Xcode files instead This is way above my skill level though
Happy to write up some new instructions if it would help future C++ Mac OS users get setup and running
I have submitted this PR (It was closed because of the automation). Should I still open a new thread as suggested in the PR or will this thread suffice as a place to discuss the PR?