Skip to content

Code signing for MacOS X

Mayeul d'Avezac edited this page Nov 5, 2015 · 1 revision

Security nerds, avert your eyes.

  1. create a code-signing certificate:

    • open key-chain access
    • select the login keychain (top-left panel)
    • menu KeyChain Access/Certificate Assistant/Create a certificate
    • choose a certificate name, self-signed, code-signing
    • curse Apple for not providing a command-line utility
  2. run cmake with:

    cmake -DCERTIFICATE="certificate name" .
  3. to every mpi target, add in the relevant CMakeLists.txt:

    add_codesigning(targetname)
  4. the very first time the certificate is used (during build) click always allow

Clone this wiki locally