Browse Source

TargetArch.cmake: fix info re OSX arch support, update copyright year

pull/1883/head
barracuda156 2 years ago committed by R4SAS
parent
commit
385e592045
  1. 18
      build/cmake_modules/TargetArch.cmake

18
build/cmake_modules/TargetArch.cmake

@ -1,4 +1,4 @@
# Copyright (c) 2017-2022, The PurpleI2P Project # Copyright (c) 2017-2023, The PurpleI2P Project
# This file is part of Purple i2pd project and licensed under BSD3 # This file is part of Purple i2pd project and licensed under BSD3
# See full license text in LICENSE file at top of project tree # See full license text in LICENSE file at top of project tree
@ -83,13 +83,13 @@ function(target_architecture output_var)
# First let's normalize the order of the values # First let's normalize the order of the values
# Note that it's not possible to compile PowerPC applications if you are using # Note that it's not possible to compile PowerPC applications if you are using
# the OS X SDK version 10.6 or later - you'll need 10.4/10.5 for that, so we # the OS X SDK version 10.7 or later - you'll need 10.4/10.5/10.6 for that, so we
# disable it by default # disable it by default. Also, ppc64 is not supported in 10.6.
# See this page for more information: # See this page for more information:
# http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4 # http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4
# Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime. # Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime.
# On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise. # On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise; 10.6 also supports ppc.
foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES}) foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES})
if("${osx_arch}" STREQUAL "ppc" AND ppc_support) if("${osx_arch}" STREQUAL "ppc" AND ppc_support)
@ -133,11 +133,11 @@ function(target_architecture output_var)
enable_language(C) enable_language(C)
# Detect the architecture in a rather creative way... # Detect the architecture in a rather creative way...
# This compiles a small C program which is a series of ifdefs that selects a # This compiles a small C program which is a series of ifdefs that selects
# particular #error preprocessor directive whose message string contains the # a particular #error preprocessor directive whose message string contains
# target architecture. The program will always fail to compile (both because # the target architecture. The program will always fail to compile (both because
# file is not a valid C program, and obviously because of the presence of the # file is not a valid C program, and obviously because of the presence of
# #error preprocessor directives... but by exploiting the preprocessor in this # the #error preprocessor directives... but by exploiting the preprocessor in this
# way, we can detect the correct target architecture even when cross-compiling, # way, we can detect the correct target architecture even when cross-compiling,
# since the program itself never needs to be run (only the compiler/preprocessor) # since the program itself never needs to be run (only the compiler/preprocessor)
try_run( try_run(

Loading…
Cancel
Save