-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt the build system to the recent source code changes. Add platform detection code for arm, arm64, x86 and x64. Offer SIMD compile options depending on platform. Add preliminary support for NEON codecs. Enable the SIMD compile options by default. - Clean cmake scripts. - Bump version to 0.3.0. - Fix UTF-8 issues.
- Loading branch information
1 parent
cf05304
commit 0d41483
Showing
4 changed files
with
175 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
# Written in 2017 by Henrik Steffen Gaßmann henrik@gassmann.onl | ||
# | ||
# To the extent possible under law, the author(s) have dedicated all | ||
# copyright and related and neighboring rights to this software to the | ||
# public domain worldwide. This software is distributed without any warranty. | ||
# | ||
# You should have received a copy of the CC0 Public Domain Dedication | ||
# along with this software. If not, see | ||
# | ||
# http://creativecommons.org/publicdomain/zero/1.0/ | ||
# | ||
######################################################################## | ||
|
||
macro(target_architecture OUTPUT_VARIABLE) | ||
message(FATAL_ERROR "the target_architecture macro has not been implemented") | ||
endmacro() | ||
function(detect_target_architecture OUTPUT_VARIABLE) | ||
try_compile(_IGNORED "${CMAKE_CURRENT_BINARY_DIR}" | ||
"${CMAKE_SOURCE_DIR}/cmake/test-arch.c" | ||
OUTPUT_VARIABLE _LOG | ||
) | ||
|
||
string(REGEX MATCH "##arch=([^#]+)##" _IGNORED "${_LOG}") | ||
|
||
set(${OUTPUT_VARIABLE} "${CMAKE_MATCH_1}" PARENT_SCOPE) | ||
if (CMAKE_MATCH_1 STREQUAL "unknown") | ||
message(WARNING "could not detect the target architecture.") | ||
endif() | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Written in 2017 by Henrik Steffen Gaßmann henrik@gassmann.onl | ||
// | ||
// To the extent possible under law, the author(s) have dedicated all | ||
// copyright and related and neighboring rights to this software to the | ||
// public domain worldwide. This software is distributed without any warranty. | ||
// | ||
// You should have received a copy of the CC0 Public Domain Dedication | ||
// along with this software. If not, see | ||
// | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
// ARM 64-Bit | ||
#if defined(__aarch64__) | ||
#error ##arch=arm64## | ||
|
||
// ARM 32-Bit | ||
#elif defined(__arm__) \ | ||
|| defined(_M_ARM) | ||
#error ##arch=arm## | ||
|
||
// x86 64-Bit | ||
#elif defined(__x86_64__) \ | ||
|| defined(_M_X64) | ||
#error ##arch=x64## | ||
|
||
// x86 32-Bit | ||
#elif defined(__i386__) \ | ||
|| defined(_M_X86) | ||
#error ##arch=x86## | ||
|
||
#else | ||
#error ##arch=unknown## | ||
#endif |