CMakePackageConfigHelpers: Add ARCH_INDEPENDENT option

Allow skipping the architecture check in the package version file generated from calling
write_basic_package_version_file. Document said architecture check.

Fixes: #16184
This commit is contained in:
Justin Bassett
2018-11-25 23:40:36 -08:00
parent 6786345210
commit eb973f935f
8 changed files with 101 additions and 2 deletions

View File

@@ -33,6 +33,11 @@ else()
endif()
# if the installed project requested no architecture check, don't perform the check
if("@CVF_ARCH_INDEPENDENT@")
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()