aboutsummaryrefslogtreecommitdiff
path: root/cmake/64-bit-toolchain.cmake
diff options
context:
space:
mode:
authoriDunk5400 <iDunk5400@users.noreply.github.com>2018-09-06 10:15:51 +0200
committeriDunk5400 <iDunk5400@users.noreply.github.com>2018-09-06 12:56:21 +0200
commit6929b524266d77b661d0e19a50e73ad0c9a05903 (patch)
tree0cb730ebfec58446b68602cfa1b7ade924271aee /cmake/64-bit-toolchain.cmake
parentMerge pull request #4290 (diff)
downloadmonero-6929b524266d77b661d0e19a50e73ad0c9a05903.tar.xz
Windows: don't preset CMAKE_SYSTEM_NAME
Let it be autodiscovered instead to avoid cmake thinking it's crosscompiling builds where host = target. This resolves a cmake configure error in MSYS2 caused by CMAKE_CROSSCOMPILING checks in #4294.
Diffstat (limited to '')
-rw-r--r--cmake/64-bit-toolchain.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/64-bit-toolchain.cmake b/cmake/64-bit-toolchain.cmake
index 20b568c71..b4b528347 100644
--- a/cmake/64-bit-toolchain.cmake
+++ b/cmake/64-bit-toolchain.cmake
@@ -26,7 +26,9 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-set (CMAKE_SYSTEM_NAME Windows)
+if (NOT CMAKE_HOST_WIN32)
+ set (CMAKE_SYSTEM_NAME Windows)
+endif()
set (GCC_PREFIX x86_64-w64-mingw32)
set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc)