mapbox / mapbox/hpp-skel

Xcode support

Open
#34 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

parity with node-cpp-skel
Dominant language
CMake
Stars
116
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Many developers at Mapbox have come to rely on the XCode IDE for developing C++ on OS X. It offers some amazing productivity enhancers like code completion, code folding, a built-in GUI for static analysis and address sanitizers, and more. This is why https://github.com/mapbox/node-cpp-skel/pull/13 was added to node-cpp-skel.

For hpp-skel the support will be much easier to add since we are using `cmake` here and `cmake` can autogenerate xcode files. Mirroring node-cpp-skel support will be as easy as adding:

```diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a81a292..aa0f8ce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,4 +12,4 @@ include_directories(SYSTEM ${MASON_PACKAGE_catch_INCLUDE_DIRS})

include_directories("${PROJECT_SOURCE_DIR}/include")

-add_executable(unit-tests test/test.cpp)
\ No newline at end of file
+add_executable(unit-tests ${PROJECT_SOURCE_DIR}/include test/test.cpp)
\ No newline at end of file
diff --git a/Makefile b/Makefile
index ad76d68..89b2584 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,9 @@ debug:
test: default
./build/unit-tests

+xcode:
+ rm -rf build/* && mkdir -p build && cd build && cmake ../ -G Xcode && open *xcodeproj
+
coverage:
./scripts/coverage.sh
```

The change of `+add_executable(unit-tests ${PROJECT_SOURCE_DIR}/include test/test.cpp)` gets the headers to show up in XCode (otherwise it does not see them by default).

/cc @kkaefer

![screen shot 2017-08-24 at 5 03 08 pm](https://user-images.githubusercontent.com/20300/29694160-f661b866-88ee-11e7-9274-186bb3e982a8.png)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Update CMakeLists.txt so headers appear in generated Xcode projects, and add the xcode target to Makefile using CMake's Xcode generator. Start by comparing the proposed changes with node-cpp-skel support, then run the xcode target and confirm that an .xcodeproj is generated and opens successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.