Page MenuHomePhabricator

[cmake] Fix cmake build on OSX after r250335 for older versions of cmake

Authored by dawn on Oct 22 2015, 2:25 PM.



Older versions of cmake don't support the -E env option which was added in r250335, causing the build to fail with:

[2632/2743] Linking CXX executable bin/debugserver
FAILED: : && /usr/bin/c++   -std=c++11 -stdlib=libc++ [...]
 -o bin/debugserver  lib/liblldbDebugserverCommon.a lib/liblldbUtility.a lib/liblldbDebugserverMacOSX_I386.a lib/liblldbDebugserverMacOSX_X86_64.a -framework Cocoa -Wl,-rpath,@executable_path/../lib && cd /Users/testuser/build/workspace/LLVM-Clang-LLDB_master_release_OSX/llvm/build_ninja/bin && /usr/local/Cellar/cmake/3.0.2/bin/cmake -E env CODESIGN_ALLOCATE=/Applications/ codesign --force --sign lldb_codesign debugserver
CMake Error: cmake version 3.0.2
Usage: /usr/local/Cellar/cmake/3.0.2/bin/cmake -E [command] [arguments ...]
Available commands:
  chdir dir cmd [args]...   - run command in a given directory

This patch fixes this by invoking codesigning as it was before the commit if the cmake version is less than than 3.2.

Diff Detail


Event Timeline

dawn updated this revision to Diff 38176.Oct 22 2015, 2:25 PM
dawn retitled this revision from to [cmake] Fix cmake build on OSX after r250335 for older versions of cmake.
dawn updated this object.
dawn added reviewers: brucem, sas, krytarowski, enlight, labath.
dawn set the repository for this revision to rL LLVM.
dawn added a subscriber: lldb-commits.
sas accepted this revision.Oct 22 2015, 3:17 PM
sas edited edge metadata.

Sorry for introducing this bug. I think this is good.

This revision is now accepted and ready to land.Oct 22 2015, 3:17 PM
This revision was automatically updated to reflect the committed changes.