commit | 768e6822ccdca50f95b1b155a2ffd2bdf99cae44 | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Thu May 11 17:50:25 2017 -0400 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Thu May 11 22:14:07 2017 +0000 |
tree | 0aba63cd8a9fd331b9c3d457f418915797b3ce98 | |
parent | edafe479684097c3be798a436edb4e094fec0022 [diff] |
Only fixup CMAKE_ASM_FLAGS -isysroot if CMAKE_OSX_SYSROOT is set. Sometimes[1] CMake will do a build on Darwin without setting up CMAKE_OSX_SYSROOT. This appears to be to support the "basic POSIX-only case"[2]. The hard-coded CMake logic we're mimicking[3] handles this case, so do the same. [1] https://github.com/Kitware/CMake/blob/f6b93fbf3ae00a9157af2f6497bed074d585cea9/Modules/Platform/Darwin-Initialize.cmake#L48 [2] https://github.com/Kitware/CMake/commit/43b74793de80153b9446689adf79c4acf1391969 [3] https://github.com/Kitware/CMake/blob/master/Source/cmLocalGenerator.cxx#L1307 Change-Id: Ica5ae8510d07eca384cc366dd3de10b0c1ce0f81 Reviewed-on: https://boringssl-review.googlesource.com/16245 Commit-Queue: David Benjamin <davidben@google.com> Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 0ca2847..557246c 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt
@@ -38,7 +38,9 @@ # CMake does not add -isysroot and -arch flags to assembly. if (APPLE) - set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -isysroot ${CMAKE_OSX_SYSROOT}") + if (CMAKE_OSX_SYSROOT) + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -isysroot ${CMAKE_OSX_SYSROOT}") + endif() foreach(arch ${CMAKE_OSX_ARCHITECTURES}) set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -arch ${arch}") endforeach()