8000 CMake: remove useless cross-compiling related checks (fixes #3746) by rouault · Pull Request #3747 · OSGeo/PROJ · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CMake: remove useless cross-compiling related checks (fixes #3746) #3747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,6 @@ else ()
set (MSVC_TOOLSET_VERSION 0)
set (MSVC_TOOLSET_MAJOR 0)
endif ()
if (CMAKE_CROSSCOMPILING)
# Ensure that all "true" (resp. "false") settings are represented by
# the same string.
set (CMAKE_CROSSCOMPILING_STR "ON")
else ()
set (CMAKE_CROSSCOMPILING_STR "OFF")
endif ()

# If this is a regular build (PROJECT_SOURCE_DIR == CMAKE_SOURCE_DIR), export legacy files by default
# Otherwise, this is embedded in another project, only export PROJ target
Expand Down
17 changes: 0 additions & 17 deletions cmake/project-config-version.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ if (MSVC)
# digit.
math (EXPR MSVC_TOOLSET_MAJOR "${MSVC_TOOLSET_VERSION}/10")
endif ()
if (CMAKE_CROSSCOMPILING)
# Ensure that all "true" (resp. "false") settings are represented by
# the same string.
set (CMAKE_CROSSCOMPILING_STR "ON")
else ()
set (CMAKE_CROSSCOMPILING_STR "OFF")
endif ()

if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_VARIANT_NAME@")
# Check package name (in particular, because of the way cmake finds
Expand All @@ -43,16 +36,6 @@ elseif (MSVC AND NOT (
# Reject if there's a mismatch in MSVC compiler versions
set (REASON "MSVC_TOOLSET_VERSION = @MSVC_TOOLSET_VERSION@")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (NOT CMAKE_CROSSCOMPILING_STR STREQUAL "@CMAKE_CROSSCOMPILING_STR@")
# Reject if there's a mismatch in ${CMAKE_CROSSCOMPILING}
set (REASON "cross-compiling = @CMAKE_CROSSCOMPILING@")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (CMAKE_CROSSCOMPILING AND
NOT (CMAKE_SYSTEM_NAME STREQUAL "@CMAKE_SYSTEM_NAME@" AND
CMAKE_SYSTEM_PROCESSOR STREQUAL "@CMAKE_SYSTEM_PROCESSOR@"))
# Reject if cross-compiling and there's a mismatch in the target system
set (REASON "target = @CMAKE_SYSTEM_NAME@-@CMAKE_SYSTEM_PROCESSOR@")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (PACKAGE_FIND_VERSION)
if (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
set (PACKAGE_VERSION_EXACT TRUE)
Expand Down
0