Created
November 5, 2015 21:20
-
-
Save d235j/695144126c2b9b8d5eec to your computer and use it in GitHub Desktop.
Skip CMake arch check on Mac OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in b/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in | |
| index bc78016..2e64771 100644 | |
| --- a/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in | |
| +++ b/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in | |
| @@ -18,6 +18,12 @@ else() | |
| endif() | |
| endif() | |
| + | |
| +# if on an Apple platform, this project might have been built as a universal binary, in which case CMAKE_SIZEOF_VOID_P will be incorrect: | |
| +if(APPLE) | |
| + return() | |
| +endif() | |
| + | |
| # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: | |
| if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") | |
| return() | |
| diff --git a/Modules/BasicConfigVersion-ExactVersion.cmake.in b/Modules/BasicConfigVersion-ExactVersion.cmake.in | |
| index de4a23a..7bcb5ad 100644 | |
| --- a/Modules/BasicConfigVersion-ExactVersion.cmake.in | |
| +++ b/Modules/BasicConfigVersion-ExactVersion.cmake.in | |
| @@ -34,6 +34,11 @@ if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) | |
| endif() | |
| +# if on an Apple platform, this project might have been built as a universal binary, in which case CMAKE_SIZEOF_VOID_P will be incorrect: | |
| +if(APPLE) | |
| + return() | |
| +endif() | |
| + | |
| # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: | |
| if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") | |
| return() | |
| diff --git a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in | |
| index a32245d..acbc8d8 100644 | |
| --- a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in | |
| +++ b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in | |
| @@ -33,6 +33,11 @@ else() | |
| endif() | |
| +# if on an Apple platform, this project might have been built as a universal binary, in which case CMAKE_SIZEOF_VOID_P will be incorrect: | |
| +if(APPLE) | |
| + return() | |
| +endif() | |
| + | |
| # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: | |
| if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") | |
| return() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment