Skip to content

Instantly share code, notes, and snippets.

// Doesn't use builtins
execlp("sh", "/bin/sh", "-c", "cd \"$1\"; shift; \"$@\"", "sh", path_to_cd, "env", arguments, NULL);
// Uses builtins
execlp("sh", "/bin/sh", "-c", "cd \"$1\"; shift; \"$@\"", "sh", path_to_cd, arguments, NULL);
// Doesn't use builtins and execs, avoiding dangling shell
execlp("sh", "/bin/sh", "-c", "cd \"$0\"; exec \"$@\"", path_to_cd, arguments, NULL);
This file has been truncated, but you can view the full file.
$ cmake .. -DENABLE_QT2=false
-- The C compiler identification is AppleClang 9.0.0.9000037
-- The CXX compiler identification is AppleClang 9.0.0.9000037
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++