Skip to content

Commit 7e10ddc

Browse files
authored
Merge pull request OSGeo#3747 from rouault/fix_3746
CMake: remove useless cross-compiling related checks (fixes OSGeo#3746)
2 parents 9d1a1a9 + 6167e76 commit 7e10ddc

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

cmake/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,6 @@ else ()
8282
set (MSVC_TOOLSET_VERSION 0)
8383
set (MSVC_TOOLSET_MAJOR 0)
8484
endif ()
85-
if (CMAKE_CROSSCOMPILING)
86-
# Ensure that all "true" (resp. "false") settings are represented by
87-
# the same string.
88-
set (CMAKE_CROSSCOMPILING_STR "ON")
89-
else ()
90-
set (CMAKE_CROSSCOMPILING_STR "OFF")
91-
endif ()
9285

9386
# If this is a regular build (PROJECT_SOURCE_DIR == CMAKE_SOURCE_DIR), export legacy files by default
9487
# Otherwise, this is embedded in another project, only export PROJ target

cmake/project-config-version.cmake.in

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ if (MSVC)
1414
# digit.
1515
math (EXPR MSVC_TOOLSET_MAJOR "${MSVC_TOOLSET_VERSION}/10")
1616
endif ()
17-
if (CMAKE_CROSSCOMPILING)
18-
# Ensure that all "true" (resp. "false") settings are represented by
19-
# the same string.
20-
set (CMAKE_CROSSCOMPILING_STR "ON")
21-
else ()
22-
set (CMAKE_CROSSCOMPILING_STR "OFF")
23-
endif ()
2417

2518
if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_VARIANT_NAME@")
2619
# Check package name (in particular, because of the way cmake finds
@@ -43,16 +36,6 @@ elseif (MSVC AND NOT (
4336
# Reject if there's a mismatch in MSVC compiler versions
4437
set (REASON "MSVC_TOOLSET_VERSION = @MSVC_TOOLSET_VERSION@")
4538
set (PACKAGE_VERSION_UNSUITABLE TRUE)
46-
elseif (NOT CMAKE_CROSSCOMPILING_STR STREQUAL "@CMAKE_CROSSCOMPILING_STR@")
47-
# Reject if there's a mismatch in ${CMAKE_CROSSCOMPILING}
48-
set (REASON "cross-compiling = @CMAKE_CROSSCOMPILING@")
49-
set (PACKAGE_VERSION_UNSUITABLE TRUE)
50-
elseif (CMAKE_CROSSCOMPILING AND
51-
NOT (CMAKE_SYSTEM_NAME STREQUAL "@CMAKE_SYSTEM_NAME@" AND
52-
CMAKE_SYSTEM_PROCESSOR STREQUAL "@CMAKE_SYSTEM_PROCESSOR@"))
53-
# Reject if cross-compiling and there's a mismatch in the target system
54-
set (REASON "target = @CMAKE_SYSTEM_NAME@-@CMAKE_SYSTEM_PROCESSOR@")
55-
set (PACKAGE_VERSION_UNSUITABLE TRUE)
5639
elseif (PACKAGE_FIND_VERSION)
5740
if (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
5841
set (PACKAGE_VERSION_EXACT TRUE)

0 commit comments

Comments
 (0)