Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
sakra committed May 21, 2021
2 parents 98d2f8e + 7e6588b commit 323f5d8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
36 changes: 29 additions & 7 deletions CMake/Mathematica/FindMathematica.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# See the FindMathematica manual for usage hints.
#
#=============================================================================
# Copyright 2010-2020 Sascha Kratky
# Copyright 2010-2021 Sascha Kratky
#
# Permission is hereby granted, free of charge, to any person)
# obtaining a copy of this software and associated documentation)
Expand Down Expand Up @@ -34,7 +34,7 @@ cmake_minimum_required(VERSION 2.8.12)
cmake_policy(POP)

set (Mathematica_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
set (Mathematica_CMAKE_MODULE_VERSION "3.4.0")
set (Mathematica_CMAKE_MODULE_VERSION "3.5.0")

# activate select policies
if (POLICY CMP0025)
Expand Down Expand Up @@ -245,7 +245,7 @@ macro (_get_program_names _outProgramNames)
set (_MathematicaApps "Mathematica" "Wolfram Desktop" "Wolfram Engine" "gridMathematica Server")
# Mathematica product versions in order of preference
set (_MathematicaVersions
"12.2" "12.1" "12.0"
"12.3" "12.2" "12.1" "12.0"
"11.3" "11.2" "11.1" "11.0"
"10.4" "10.3" "10.2" "10.1" "10.0"
"9.0" "8.0" "7.0" "6.0" "5.2")
Expand Down Expand Up @@ -500,6 +500,8 @@ macro (_systemNameToSystemID _systemName _systemProcessor _outSystemIDs)
set (${_outSystemIDs} "MacOSX-x86")
elseif ("${_systemProcessor}" STREQUAL "x86_64")
set (${_outSystemIDs} "MacOSX-x86-64")
elseif ("${_systemProcessor}" STREQUAL "arm64")
set (${_outSystemIDs} "MacOSX-ARM64")
elseif ("${_systemProcessor}" MATCHES "ppc64|powerpc64")
set (${_outSystemIDs} "Darwin-PowerPC64")
elseif ("${_systemProcessor}" MATCHES "ppc|powerpc")
Expand Down Expand Up @@ -648,7 +650,12 @@ macro (_get_host_system_IDs _outSystemIDs)
endmacro()

macro (_get_supported_systemIDs _version _outSystemIDs)
if (NOT "${_version}" VERSION_LESS "12.1")
if (NOT "${_version}" VERSION_LESS "12.3")
set (${_outSystemIDs}
"Windows-x86-64"
"Linux-x86-64" "Linux-ARM"
"MacOSX-x86-64" "MacOSX-ARM64")
elseif (NOT "${_version}" VERSION_LESS "12.1")
set (${_outSystemIDs}
"Windows-x86-64"
"Linux-x86-64" "Linux-ARM"
Expand Down Expand Up @@ -741,6 +748,19 @@ macro (_get_compatible_system_IDs _systemID _outSystemIDs)
else()
list (APPEND ${_outSystemIDs} "MacOSX-x86-64" "MacOSX-x86")
endif()
elseif ("${_systemID}" MATCHES "MacOSX-ARM64")
if (Mathematica_VERSION)
# Mathematica 12.3 added support for MacOSX-ARM64
if (NOT "${Mathematica_VERSION}" VERSION_LESS "12.3")
list (APPEND ${_outSystemIDs} "MacOSX-ARM64")
endif()
# Mathematica 6 added support for MacOSX-x86-64
if (NOT "${Mathematica_VERSION}" VERSION_LESS "6.0")
list (APPEND ${_outSystemIDs} "MacOSX-x86-64")
endif()
else()
list (APPEND ${_outSystemIDs} "MacOSX-ARM64" "MacOSX-x86-64")
endif()
elseif ("${_systemID}" STREQUAL "Darwin-PowerPC64")
if (Mathematica_VERSION)
if (NOT "${Mathematica_VERSION}" VERSION_LESS "5.2" AND
Expand Down Expand Up @@ -801,7 +821,7 @@ macro(_get_developer_kit_system_IDs _outSystemIDs)
set (${_outSystemIDs} "")
else()
# Mathematica versions after 9 have a system ID subdirectory
set (${_outSystemIDs} "MacOSX-x86-64")
set (${_outSystemIDs} "MacOSX-x86-64" "MacOSX-ARM64")
endif()
else()
_get_system_IDs(${_outSystemIDs})
Expand All @@ -819,8 +839,8 @@ macro(_get_host_developer_kit_system_IDs _outSystemIDs)
if ("${Mathematica_VERSION}" VERSION_LESS "9.0")
set (${_outSystemIDs} "")
else()
# The MacOSX-x86-64 DeveloperKit is a universal binary with architectures i386 and x86_64
set (${_outSystemIDs} "MacOSX-x86-64")
# Mathematica versions after 9 have a system ID subdirectory
set (${_outSystemIDs} "MacOSX-x86-64" "MacOSX-ARM64")
endif()
else()
_get_host_system_IDs(${_outSystemIDs})
Expand Down Expand Up @@ -3019,6 +3039,8 @@ macro (_add_launch_prefix _cmdVar _systemIDVar)
list (APPEND ${_cmdVar} "/usr/bin/arch" "-i386")
elseif("${${_systemIDVar}}" STREQUAL "MacOSX-x86-64")
list (APPEND ${_cmdVar} "/usr/bin/arch" "-x86_64")
elseif("${${_systemIDVar}}" STREQUAL "MacOSX-ARM64")
list (APPEND ${_cmdVar} "/usr/bin/arch" "-arm64")
elseif("${${_systemIDVar}}" MATCHES "Darwin|MacOSX")
list (APPEND ${_cmdVar} "/usr/bin/arch" "-ppc")
elseif("${${_systemIDVar}}" STREQUAL "Darwin-PowerPC64")
Expand Down
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.5.0 (2021-05-21)

* *Mathematica* 12.3 compatibility

## 3.4.0 (2020-12-19)

* *Mathematica* 12.2 compatibility
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2010-2020 Sascha Kratky
Copyright (c) 2010-2021 Sascha Kratky

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Features
--------

* Works with Windows, Linux and OS X versions of the [Wolfram Language][wlang].
* Supports Wolfram Language versions from 5.2 to 12.2.
* Supports Wolfram Language versions from 5.2 to 12.3.
* Supports Wolfram Language implementations [Wolfram Mathematica][wmma],
[Wolfram|One][wone], [Wolfram Engine][weng] and [Wolfram gridMathematica][wgrid].
* Finds include directories and libraries for [LibraryLink][wll] (version 8 or later).
Expand Down Expand Up @@ -63,8 +63,8 @@ See the [FindMathematica manual][manual] for more information.
Alternatives
------------

In October 2020 Wolfram has released [LibraryLinkUtilities][wllu] as an open source project
that provides modern C++ wrappers for conveniently wrapping Wolfram LibraryLink code.
In October 2020, Wolfram Research have released [LibraryLinkUtilities][wllu] as an open source
project that provides modern C++ wrappers for conveniently wrapping Wolfram LibraryLink code.

[aant]:https://ant.apache.org/
[ccg]:https://reference.wolfram.com/language/CCodeGenerator/guide/CCodeGenerator.html
Expand Down

0 comments on commit 323f5d8

Please sign in to comment.