mathematical 1.6.8 → 1.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/ext/mathematical/extconf.rb +27 -9
- data/ext/mathematical/lib/liblasem.dylib +0 -0
- data/ext/mathematical/lib/libmtex2MML.a +0 -0
- data/ext/mathematical/mtex2MML/build/CMakeCache.txt +9 -7
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.8.0/CMakeCCompiler.cmake +68 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.8.0/CMakeCXXCompiler.cmake +70 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.8.0/CMakeDetermineCompilerABI_C.bin +0 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.8.0/CMakeDetermineCompilerABI_CXX.bin +0 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.8.0/CMakeSystem.cmake +15 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.8.0/CompilerIdC/CMakeCCompilerId.c +567 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.8.0/CompilerIdC/a.out +0 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.8.0/CompilerIdCXX/CMakeCXXCompilerId.cpp +539 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/3.8.0/CompilerIdCXX/a.out +0 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeOutput.log +532 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/CMakeRuleHashes.txt +28 -28
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Continuous.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousBuild.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousConfigure.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousCoverage.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousMemCheck.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousStart.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousSubmit.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousTest.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ContinuousUpdate.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Experimental.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalBuild.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalConfigure.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalCoverage.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalMemCheck.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalStart.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalSubmit.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalTest.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/ExperimentalUpdate.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile.cmake +107 -107
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Makefile2 +3 -3
- data/ext/mathematical/mtex2MML/build/CMakeFiles/Nightly.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyBuild.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyConfigure.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyCoverage.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemCheck.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyMemoryCheck.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyStart.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlySubmit.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyTest.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/NightlyUpdate.dir/build.make +4 -4
- data/ext/mathematical/mtex2MML/build/CMakeFiles/feature_tests.bin +0 -0
- data/ext/mathematical/mtex2MML/build/CMakeFiles/format.dir/build.make +3 -3
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/build.make +24 -24
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/cmake_clean.cmake +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/flags.make +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML.dir/link.txt +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/C.includecache +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/build.make +24 -24
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/depend.internal +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/depend.make +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/libmtex2MML_static.dir/flags.make +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/memcheck.dir/build.make +3 -3
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/build.make +27 -27
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/flags.make +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML.dir/link.txt +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/build.make +75 -75
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/flags.make +1 -1
- data/ext/mathematical/mtex2MML/build/CMakeFiles/mtex2MML_clar.dir/link.txt +1 -1
- data/ext/mathematical/mtex2MML/build/DartConfiguration.tcl +2 -2
- data/ext/mathematical/mtex2MML/build/Makefile +15 -13
- data/ext/mathematical/mtex2MML/build/libmtex2MML.a +0 -0
- data/lib/mathematical/validator.rb +1 -1
- data/lib/mathematical/version.rb +1 -1
- data/test/mathematical/maliciousness_test.rb +3 -2
- metadata +12 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ca8cd6855138696899ff2ea0c0bbeb158e7cf9f
|
4
|
+
data.tar.gz: fd70b584ab7a1362448132f4587c652bd550d642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78900a0c9f91af294b4badc8f0f3b69783ae76d8f01b19444d9e0007baca9c96dc3f82a6efa62ff48cbe0bab3cd17ff26e6fd9bab59dd48070ca13d35ef8489f
|
7
|
+
data.tar.gz: 9e028183c3380b18deedd0800de04e7b3849fc417676d656b23e7895b9d85ee501d63e3edc863dc20f48edbbe7ecfb2e7fd8af08229338263f882c331ef9eb41
|
data/README.md
CHANGED
@@ -157,6 +157,18 @@ If you're having issues building Lasem, or have Lasem already preinstalled, you
|
|
157
157
|
|
158
158
|
MATHEMATICAL_USE_SYSTEM_LASEM=1 gem install mathematical
|
159
159
|
|
160
|
+
### Issues building mtex2mml
|
161
|
+
|
162
|
+
If you're having issues building mtex2mml, or have mtex2mml already preinstalled, you should set the `MATHEMATICAL_USE_SYSTEM_MTEX2MML` environment variable to skip the build:
|
163
|
+
|
164
|
+
* If you use bundler:
|
165
|
+
|
166
|
+
MATHEMATICAL_USE_SYSTEM_MTEX2MML=1 bundle install
|
167
|
+
|
168
|
+
* If you use gem install:
|
169
|
+
|
170
|
+
MATHEMATICAL_USE_SYSTEM_MTEX2MML=1 gem install mathematical
|
171
|
+
|
160
172
|
## Benchmark
|
161
173
|
|
162
174
|
Run benchmarks with `bundle exec rake benchmark`:
|
data/ext/mathematical/extconf.rb
CHANGED
@@ -21,6 +21,10 @@ def using_system_lasem?
|
|
21
21
|
arg_config('--use-system-lasem', !!ENV['MATHEMATICAL_USE_SYSTEM_LASEM'])
|
22
22
|
end
|
23
23
|
|
24
|
+
def using_system_mtex2mml?
|
25
|
+
arg_config('--use-system-mtex2MML', !!ENV['MATHEMATICAL_USE_SYSTEM_MTEX2MML'])
|
26
|
+
end
|
27
|
+
|
24
28
|
ROOT_TMP = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'tmp'))
|
25
29
|
|
26
30
|
LASEM_DIR = File.expand_path(File.join(File.dirname(__FILE__), 'lasem'))
|
@@ -57,10 +61,22 @@ end
|
|
57
61
|
clean_dir(MTEX2MML_BUILD_DIR)
|
58
62
|
clean_dir(LASEM_BUILD_DIR)
|
59
63
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
+
if !using_system_mtex2mml?
|
65
|
+
# build mtex2MML library
|
66
|
+
Dir.chdir(MTEX2MML_BUILD_DIR) do
|
67
|
+
system 'cmake ..'
|
68
|
+
system 'make libmtex2MML_static'
|
69
|
+
end
|
70
|
+
FileUtils.mkdir_p(MTEX2MML_LIB_DIR)
|
71
|
+
FileUtils.cp_r(File.join(MTEX2MML_BUILD_DIR, 'libmtex2MML.a'), MTEX2MML_LIB_DIR)
|
72
|
+
$LIBS << ' -lmtex2MML'
|
73
|
+
else
|
74
|
+
if dir_config('mtex2MML').any? || system('dpkg -s libmtex2MML >/dev/null')
|
75
|
+
$LIBS << ' -lmtex2MML'
|
76
|
+
else
|
77
|
+
# NOTE: pkg_config implicitly adds right -l argument for the linker.
|
78
|
+
pkg_config('libmtex2MML') || pkg_config('mtex2MML')
|
79
|
+
end
|
64
80
|
end
|
65
81
|
|
66
82
|
if !using_system_lasem?
|
@@ -72,13 +88,16 @@ if !using_system_lasem?
|
|
72
88
|
end
|
73
89
|
FileUtils.mkdir_p(LASEM_LIB_DIR)
|
74
90
|
FileUtils.cp_r(File.join(LASEM_BUILD_DIR, "liblasem.#{SHARED_EXT}"), LASEM_LIB_DIR)
|
91
|
+
$LIBS << ' -llasem'
|
75
92
|
else
|
76
|
-
dir_config('lasem').any? ||
|
93
|
+
if dir_config('lasem').any? || system('dpkg -s liblasem >/dev/null')
|
94
|
+
$LIBS << ' -llasem'
|
95
|
+
else
|
96
|
+
# NOTE: pkg_config implicitly adds right -l argument for the linker.
|
97
|
+
pkg_config('liblasem') || pkg_config('lasem')
|
98
|
+
end
|
77
99
|
end
|
78
100
|
|
79
|
-
FileUtils.mkdir_p(MTEX2MML_LIB_DIR)
|
80
|
-
FileUtils.cp_r(File.join(MTEX2MML_BUILD_DIR, 'libmtex2MML.a'), MTEX2MML_LIB_DIR)
|
81
|
-
|
82
101
|
LIB_DIRS = [MTEX2MML_LIB_DIR, LASEM_LIB_DIR]
|
83
102
|
HEADER_DIRS = [MTEX2MML_SRC_DIR, LASEM_SRC_DIR]
|
84
103
|
|
@@ -89,6 +108,5 @@ find_header('mtex2MML.h', MTEX2MML_SRC_DIR)
|
|
89
108
|
flag = ENV['TRAVIS'] ? '-O0' : '-O2'
|
90
109
|
$LDFLAGS << " #{`pkg-config --static --libs glib-2.0 gdk-pixbuf-2.0 cairo pango`.chomp}"
|
91
110
|
$CFLAGS << " #{flag} #{`pkg-config --cflags glib-2.0 gdk-pixbuf-2.0 cairo pango`.chomp}"
|
92
|
-
$LIBS << ' -lmtex2MML -llasem'
|
93
111
|
|
94
112
|
create_makefile('mathematical/mathematical')
|
Binary file
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# This is the CMakeCache file.
|
2
2
|
# For build in directory: /Users/gjtorikian/Developer/mathematical/ext/mathematical/mtex2MML/build
|
3
|
-
# It was generated by CMake: /usr/local/Cellar/cmake/3.
|
3
|
+
# It was generated by CMake: /usr/local/Cellar/cmake/3.8.0/bin/cmake
|
4
4
|
# You can edit this file to change values found and used by cmake.
|
5
5
|
# If you do not want to change any of the values, simply exit the editor.
|
6
6
|
# If you do want to change a value, simply edit, save, and exit the editor.
|
@@ -305,19 +305,19 @@ CMAKE_CACHEFILE_DIR:INTERNAL=/Users/gjtorikian/Developer/mathematical/ext/mathem
|
|
305
305
|
//Major version of cmake used to create the current loaded cache
|
306
306
|
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
|
307
307
|
//Minor version of cmake used to create the current loaded cache
|
308
|
-
CMAKE_CACHE_MINOR_VERSION:INTERNAL=
|
308
|
+
CMAKE_CACHE_MINOR_VERSION:INTERNAL=8
|
309
309
|
//Patch version of cmake used to create the current loaded cache
|
310
|
-
CMAKE_CACHE_PATCH_VERSION:INTERNAL=
|
310
|
+
CMAKE_CACHE_PATCH_VERSION:INTERNAL=0
|
311
311
|
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
|
312
312
|
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
|
313
313
|
//Path to CMake executable.
|
314
|
-
CMAKE_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.
|
314
|
+
CMAKE_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.8.0/bin/cmake
|
315
315
|
//Path to cpack program executable.
|
316
|
-
CMAKE_CPACK_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.
|
316
|
+
CMAKE_CPACK_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.8.0/bin/cpack
|
317
317
|
//ADVANCED property for variable: CMAKE_CTEST_COMMAND
|
318
318
|
CMAKE_CTEST_COMMAND-ADVANCED:INTERNAL=1
|
319
319
|
//Path to ctest program executable.
|
320
|
-
CMAKE_CTEST_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.
|
320
|
+
CMAKE_CTEST_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.8.0/bin/ctest
|
321
321
|
//ADVANCED property for variable: CMAKE_CXX_COMPILER
|
322
322
|
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
|
323
323
|
//ADVANCED property for variable: CMAKE_CXX_FLAGS
|
@@ -393,10 +393,12 @@ CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
|
|
393
393
|
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
|
394
394
|
//ADVANCED property for variable: CMAKE_OBJDUMP
|
395
395
|
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
|
396
|
+
//Platform information initialized
|
397
|
+
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
|
396
398
|
//ADVANCED property for variable: CMAKE_RANLIB
|
397
399
|
CMAKE_RANLIB-ADVANCED:INTERNAL=1
|
398
400
|
//Path to CMake installation.
|
399
|
-
CMAKE_ROOT:INTERNAL=/usr/local/Cellar/cmake/3.
|
401
|
+
CMAKE_ROOT:INTERNAL=/usr/local/Cellar/cmake/3.8.0/share/cmake
|
400
402
|
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
|
401
403
|
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
402
404
|
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
|
@@ -0,0 +1,68 @@
|
|
1
|
+
set(CMAKE_C_COMPILER "/Library/Developer/CommandLineTools/usr/bin/cc")
|
2
|
+
set(CMAKE_C_COMPILER_ARG1 "")
|
3
|
+
set(CMAKE_C_COMPILER_ID "AppleClang")
|
4
|
+
set(CMAKE_C_COMPILER_VERSION "8.1.0.8020042")
|
5
|
+
set(CMAKE_C_COMPILER_WRAPPER "")
|
6
|
+
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
|
7
|
+
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
|
8
|
+
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
|
9
|
+
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
|
10
|
+
set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
|
11
|
+
|
12
|
+
set(CMAKE_C_PLATFORM_ID "Darwin")
|
13
|
+
set(CMAKE_C_SIMULATE_ID "")
|
14
|
+
set(CMAKE_C_SIMULATE_VERSION "")
|
15
|
+
|
16
|
+
set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
|
17
|
+
set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
|
18
|
+
set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
|
19
|
+
set(CMAKE_COMPILER_IS_GNUCC )
|
20
|
+
set(CMAKE_C_COMPILER_LOADED 1)
|
21
|
+
set(CMAKE_C_COMPILER_WORKS TRUE)
|
22
|
+
set(CMAKE_C_ABI_COMPILED TRUE)
|
23
|
+
set(CMAKE_COMPILER_IS_MINGW )
|
24
|
+
set(CMAKE_COMPILER_IS_CYGWIN )
|
25
|
+
if(CMAKE_COMPILER_IS_CYGWIN)
|
26
|
+
set(CYGWIN 1)
|
27
|
+
set(UNIX 1)
|
28
|
+
endif()
|
29
|
+
|
30
|
+
set(CMAKE_C_COMPILER_ENV_VAR "CC")
|
31
|
+
|
32
|
+
if(CMAKE_COMPILER_IS_MINGW)
|
33
|
+
set(MINGW 1)
|
34
|
+
endif()
|
35
|
+
set(CMAKE_C_COMPILER_ID_RUN 1)
|
36
|
+
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
|
37
|
+
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
38
|
+
set(CMAKE_C_LINKER_PREFERENCE 10)
|
39
|
+
|
40
|
+
# Save compiler ABI information.
|
41
|
+
set(CMAKE_C_SIZEOF_DATA_PTR "8")
|
42
|
+
set(CMAKE_C_COMPILER_ABI "")
|
43
|
+
set(CMAKE_C_LIBRARY_ARCHITECTURE "")
|
44
|
+
|
45
|
+
if(CMAKE_C_SIZEOF_DATA_PTR)
|
46
|
+
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
|
47
|
+
endif()
|
48
|
+
|
49
|
+
if(CMAKE_C_COMPILER_ABI)
|
50
|
+
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
|
51
|
+
endif()
|
52
|
+
|
53
|
+
if(CMAKE_C_LIBRARY_ARCHITECTURE)
|
54
|
+
set(CMAKE_LIBRARY_ARCHITECTURE "")
|
55
|
+
endif()
|
56
|
+
|
57
|
+
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
|
58
|
+
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
|
59
|
+
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
|
60
|
+
endif()
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
|
67
|
+
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib;/usr/local/lib")
|
68
|
+
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Frameworks;/System/Library/Frameworks")
|
@@ -0,0 +1,70 @@
|
|
1
|
+
set(CMAKE_CXX_COMPILER "/Library/Developer/CommandLineTools/usr/bin/c++")
|
2
|
+
set(CMAKE_CXX_COMPILER_ARG1 "")
|
3
|
+
set(CMAKE_CXX_COMPILER_ID "AppleClang")
|
4
|
+
set(CMAKE_CXX_COMPILER_VERSION "8.1.0.8020042")
|
5
|
+
set(CMAKE_CXX_COMPILER_WRAPPER "")
|
6
|
+
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98")
|
7
|
+
set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17")
|
8
|
+
set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
|
9
|
+
set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
|
10
|
+
set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
|
11
|
+
set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
|
12
|
+
|
13
|
+
set(CMAKE_CXX_PLATFORM_ID "Darwin")
|
14
|
+
set(CMAKE_CXX_SIMULATE_ID "")
|
15
|
+
set(CMAKE_CXX_SIMULATE_VERSION "")
|
16
|
+
|
17
|
+
set(CMAKE_AR "/Library/Developer/CommandLineTools/usr/bin/ar")
|
18
|
+
set(CMAKE_RANLIB "/Library/Developer/CommandLineTools/usr/bin/ranlib")
|
19
|
+
set(CMAKE_LINKER "/Library/Developer/CommandLineTools/usr/bin/ld")
|
20
|
+
set(CMAKE_COMPILER_IS_GNUCXX )
|
21
|
+
set(CMAKE_CXX_COMPILER_LOADED 1)
|
22
|
+
set(CMAKE_CXX_COMPILER_WORKS TRUE)
|
23
|
+
set(CMAKE_CXX_ABI_COMPILED TRUE)
|
24
|
+
set(CMAKE_COMPILER_IS_MINGW )
|
25
|
+
set(CMAKE_COMPILER_IS_CYGWIN )
|
26
|
+
if(CMAKE_COMPILER_IS_CYGWIN)
|
27
|
+
set(CYGWIN 1)
|
28
|
+
set(UNIX 1)
|
29
|
+
endif()
|
30
|
+
|
31
|
+
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
|
32
|
+
|
33
|
+
if(CMAKE_COMPILER_IS_MINGW)
|
34
|
+
set(MINGW 1)
|
35
|
+
endif()
|
36
|
+
set(CMAKE_CXX_COMPILER_ID_RUN 1)
|
37
|
+
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
38
|
+
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
|
39
|
+
set(CMAKE_CXX_LINKER_PREFERENCE 30)
|
40
|
+
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
41
|
+
|
42
|
+
# Save compiler ABI information.
|
43
|
+
set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
|
44
|
+
set(CMAKE_CXX_COMPILER_ABI "")
|
45
|
+
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
|
46
|
+
|
47
|
+
if(CMAKE_CXX_SIZEOF_DATA_PTR)
|
48
|
+
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
|
49
|
+
endif()
|
50
|
+
|
51
|
+
if(CMAKE_CXX_COMPILER_ABI)
|
52
|
+
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
|
53
|
+
endif()
|
54
|
+
|
55
|
+
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
|
56
|
+
set(CMAKE_LIBRARY_ARCHITECTURE "")
|
57
|
+
endif()
|
58
|
+
|
59
|
+
set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
|
60
|
+
if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
|
61
|
+
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
|
62
|
+
endif()
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "c++")
|
69
|
+
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib;/usr/local/lib")
|
70
|
+
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Library/Frameworks;/System/Library/Frameworks")
|
Binary file
|
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
set(CMAKE_HOST_SYSTEM "Darwin-16.5.0")
|
2
|
+
set(CMAKE_HOST_SYSTEM_NAME "Darwin")
|
3
|
+
set(CMAKE_HOST_SYSTEM_VERSION "16.5.0")
|
4
|
+
set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
set(CMAKE_SYSTEM "Darwin-16.5.0")
|
9
|
+
set(CMAKE_SYSTEM_NAME "Darwin")
|
10
|
+
set(CMAKE_SYSTEM_VERSION "16.5.0")
|
11
|
+
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
12
|
+
|
13
|
+
set(CMAKE_CROSSCOMPILING "FALSE")
|
14
|
+
|
15
|
+
set(CMAKE_SYSTEM_LOADED 1)
|
@@ -0,0 +1,567 @@
|
|
1
|
+
#ifdef __cplusplus
|
2
|
+
# error "A C++ compiler has been selected for C."
|
3
|
+
#endif
|
4
|
+
|
5
|
+
#if defined(__18CXX)
|
6
|
+
# define ID_VOID_MAIN
|
7
|
+
#endif
|
8
|
+
#if defined(__CLASSIC_C__)
|
9
|
+
/* cv-qualifiers did not exist in K&R C */
|
10
|
+
# define const
|
11
|
+
# define volatile
|
12
|
+
#endif
|
13
|
+
|
14
|
+
|
15
|
+
/* Version number components: V=Version, R=Revision, P=Patch
|
16
|
+
Version date components: YYYY=Year, MM=Month, DD=Day */
|
17
|
+
|
18
|
+
#if defined(__INTEL_COMPILER) || defined(__ICC)
|
19
|
+
# define COMPILER_ID "Intel"
|
20
|
+
# if defined(_MSC_VER)
|
21
|
+
# define SIMULATE_ID "MSVC"
|
22
|
+
# endif
|
23
|
+
/* __INTEL_COMPILER = VRP */
|
24
|
+
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
25
|
+
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
26
|
+
# if defined(__INTEL_COMPILER_UPDATE)
|
27
|
+
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
28
|
+
# else
|
29
|
+
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
30
|
+
# endif
|
31
|
+
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
32
|
+
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
33
|
+
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
34
|
+
# endif
|
35
|
+
# if defined(_MSC_VER)
|
36
|
+
/* _MSC_VER = VVRR */
|
37
|
+
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
38
|
+
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
39
|
+
# endif
|
40
|
+
|
41
|
+
#elif defined(__PATHCC__)
|
42
|
+
# define COMPILER_ID "PathScale"
|
43
|
+
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
44
|
+
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
45
|
+
# if defined(__PATHCC_PATCHLEVEL__)
|
46
|
+
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
47
|
+
# endif
|
48
|
+
|
49
|
+
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
50
|
+
# define COMPILER_ID "Embarcadero"
|
51
|
+
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
52
|
+
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
53
|
+
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
|
54
|
+
|
55
|
+
#elif defined(__BORLANDC__)
|
56
|
+
# define COMPILER_ID "Borland"
|
57
|
+
/* __BORLANDC__ = 0xVRR */
|
58
|
+
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
59
|
+
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
60
|
+
|
61
|
+
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
62
|
+
# define COMPILER_ID "Watcom"
|
63
|
+
/* __WATCOMC__ = VVRR */
|
64
|
+
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
65
|
+
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
66
|
+
# if (__WATCOMC__ % 10) > 0
|
67
|
+
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
68
|
+
# endif
|
69
|
+
|
70
|
+
#elif defined(__WATCOMC__)
|
71
|
+
# define COMPILER_ID "OpenWatcom"
|
72
|
+
/* __WATCOMC__ = VVRP + 1100 */
|
73
|
+
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
74
|
+
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
75
|
+
# if (__WATCOMC__ % 10) > 0
|
76
|
+
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
77
|
+
# endif
|
78
|
+
|
79
|
+
#elif defined(__SUNPRO_C)
|
80
|
+
# define COMPILER_ID "SunPro"
|
81
|
+
# if __SUNPRO_C >= 0x5100
|
82
|
+
/* __SUNPRO_C = 0xVRRP */
|
83
|
+
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
|
84
|
+
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
|
85
|
+
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
86
|
+
# else
|
87
|
+
/* __SUNPRO_CC = 0xVRP */
|
88
|
+
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
|
89
|
+
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
|
90
|
+
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
91
|
+
# endif
|
92
|
+
|
93
|
+
#elif defined(__HP_cc)
|
94
|
+
# define COMPILER_ID "HP"
|
95
|
+
/* __HP_cc = VVRRPP */
|
96
|
+
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
|
97
|
+
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
|
98
|
+
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
|
99
|
+
|
100
|
+
#elif defined(__DECC)
|
101
|
+
# define COMPILER_ID "Compaq"
|
102
|
+
/* __DECC_VER = VVRRTPPPP */
|
103
|
+
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
|
104
|
+
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
|
105
|
+
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
|
106
|
+
|
107
|
+
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
|
108
|
+
# define COMPILER_ID "zOS"
|
109
|
+
/* __IBMC__ = VRP */
|
110
|
+
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
111
|
+
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
112
|
+
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
113
|
+
|
114
|
+
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
|
115
|
+
# define COMPILER_ID "XL"
|
116
|
+
/* __IBMC__ = VRP */
|
117
|
+
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
118
|
+
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
119
|
+
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
120
|
+
|
121
|
+
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
|
122
|
+
# define COMPILER_ID "VisualAge"
|
123
|
+
/* __IBMC__ = VRP */
|
124
|
+
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
125
|
+
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
126
|
+
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
127
|
+
|
128
|
+
#elif defined(__PGI)
|
129
|
+
# define COMPILER_ID "PGI"
|
130
|
+
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
131
|
+
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
132
|
+
# if defined(__PGIC_PATCHLEVEL__)
|
133
|
+
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
134
|
+
# endif
|
135
|
+
|
136
|
+
#elif defined(_CRAYC)
|
137
|
+
# define COMPILER_ID "Cray"
|
138
|
+
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
139
|
+
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
140
|
+
|
141
|
+
#elif defined(__TI_COMPILER_VERSION__)
|
142
|
+
# define COMPILER_ID "TI"
|
143
|
+
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
144
|
+
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
145
|
+
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
146
|
+
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
147
|
+
|
148
|
+
#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
|
149
|
+
# define COMPILER_ID "Fujitsu"
|
150
|
+
|
151
|
+
#elif defined(__TINYC__)
|
152
|
+
# define COMPILER_ID "TinyCC"
|
153
|
+
|
154
|
+
#elif defined(__BCC__)
|
155
|
+
# define COMPILER_ID "Bruce"
|
156
|
+
|
157
|
+
#elif defined(__SCO_VERSION__)
|
158
|
+
# define COMPILER_ID "SCO"
|
159
|
+
|
160
|
+
#elif defined(__clang__) && defined(__apple_build_version__)
|
161
|
+
# define COMPILER_ID "AppleClang"
|
162
|
+
# if defined(_MSC_VER)
|
163
|
+
# define SIMULATE_ID "MSVC"
|
164
|
+
# endif
|
165
|
+
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
166
|
+
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
167
|
+
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
168
|
+
# if defined(_MSC_VER)
|
169
|
+
/* _MSC_VER = VVRR */
|
170
|
+
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
171
|
+
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
172
|
+
# endif
|
173
|
+
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
174
|
+
|
175
|
+
#elif defined(__clang__)
|
176
|
+
# define COMPILER_ID "Clang"
|
177
|
+
# if defined(_MSC_VER)
|
178
|
+
# define SIMULATE_ID "MSVC"
|
179
|
+
# endif
|
180
|
+
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
181
|
+
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
182
|
+
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
183
|
+
# if defined(_MSC_VER)
|
184
|
+
/* _MSC_VER = VVRR */
|
185
|
+
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
186
|
+
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
187
|
+
# endif
|
188
|
+
|
189
|
+
#elif defined(__GNUC__)
|
190
|
+
# define COMPILER_ID "GNU"
|
191
|
+
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
192
|
+
# if defined(__GNUC_MINOR__)
|
193
|
+
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
194
|
+
# endif
|
195
|
+
# if defined(__GNUC_PATCHLEVEL__)
|
196
|
+
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
197
|
+
# endif
|
198
|
+
|
199
|
+
#elif defined(_MSC_VER)
|
200
|
+
# define COMPILER_ID "MSVC"
|
201
|
+
/* _MSC_VER = VVRR */
|
202
|
+
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
203
|
+
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
204
|
+
# if defined(_MSC_FULL_VER)
|
205
|
+
# if _MSC_VER >= 1400
|
206
|
+
/* _MSC_FULL_VER = VVRRPPPPP */
|
207
|
+
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
208
|
+
# else
|
209
|
+
/* _MSC_FULL_VER = VVRRPPPP */
|
210
|
+
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
211
|
+
# endif
|
212
|
+
# endif
|
213
|
+
# if defined(_MSC_BUILD)
|
214
|
+
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
215
|
+
# endif
|
216
|
+
|
217
|
+
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
218
|
+
# define COMPILER_ID "ADSP"
|
219
|
+
#if defined(__VISUALDSPVERSION__)
|
220
|
+
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
221
|
+
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
222
|
+
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
223
|
+
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
224
|
+
#endif
|
225
|
+
|
226
|
+
#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC)
|
227
|
+
# define COMPILER_ID "IAR"
|
228
|
+
|
229
|
+
#elif defined(__ARMCC_VERSION)
|
230
|
+
# define COMPILER_ID "ARMCC"
|
231
|
+
#if __ARMCC_VERSION >= 1000000
|
232
|
+
/* __ARMCC_VERSION = VRRPPPP */
|
233
|
+
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
|
234
|
+
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
|
235
|
+
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
236
|
+
#else
|
237
|
+
/* __ARMCC_VERSION = VRPPPP */
|
238
|
+
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
|
239
|
+
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
|
240
|
+
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
241
|
+
#endif
|
242
|
+
|
243
|
+
|
244
|
+
#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
|
245
|
+
# define COMPILER_ID "SDCC"
|
246
|
+
# if defined(__SDCC_VERSION_MAJOR)
|
247
|
+
# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
|
248
|
+
# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
|
249
|
+
# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
|
250
|
+
# else
|
251
|
+
/* SDCC = VRP */
|
252
|
+
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
|
253
|
+
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
|
254
|
+
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
|
255
|
+
# endif
|
256
|
+
|
257
|
+
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
|
258
|
+
# define COMPILER_ID "MIPSpro"
|
259
|
+
# if defined(_SGI_COMPILER_VERSION)
|
260
|
+
/* _SGI_COMPILER_VERSION = VRP */
|
261
|
+
# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100)
|
262
|
+
# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10)
|
263
|
+
# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10)
|
264
|
+
# else
|
265
|
+
/* _COMPILER_VERSION = VRP */
|
266
|
+
# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100)
|
267
|
+
# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10)
|
268
|
+
# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10)
|
269
|
+
# endif
|
270
|
+
|
271
|
+
|
272
|
+
/* These compilers are either not known or too old to define an
|
273
|
+
identification macro. Try to identify the platform and guess that
|
274
|
+
it is the native compiler. */
|
275
|
+
#elif defined(__sgi)
|
276
|
+
# define COMPILER_ID "MIPSpro"
|
277
|
+
|
278
|
+
#elif defined(__hpux) || defined(__hpua)
|
279
|
+
# define COMPILER_ID "HP"
|
280
|
+
|
281
|
+
#else /* unknown compiler */
|
282
|
+
# define COMPILER_ID ""
|
283
|
+
#endif
|
284
|
+
|
285
|
+
/* Construct the string literal in pieces to prevent the source from
|
286
|
+
getting matched. Store it in a pointer rather than an array
|
287
|
+
because some compilers will just produce instructions to fill the
|
288
|
+
array rather than assigning a pointer to a static array. */
|
289
|
+
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
290
|
+
#ifdef SIMULATE_ID
|
291
|
+
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
292
|
+
#endif
|
293
|
+
|
294
|
+
#ifdef __QNXNTO__
|
295
|
+
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
296
|
+
#endif
|
297
|
+
|
298
|
+
#if defined(__CRAYXE) || defined(__CRAYXC)
|
299
|
+
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
300
|
+
#endif
|
301
|
+
|
302
|
+
#define STRINGIFY_HELPER(X) #X
|
303
|
+
#define STRINGIFY(X) STRINGIFY_HELPER(X)
|
304
|
+
|
305
|
+
/* Identify known platforms by name. */
|
306
|
+
#if defined(__linux) || defined(__linux__) || defined(linux)
|
307
|
+
# define PLATFORM_ID "Linux"
|
308
|
+
|
309
|
+
#elif defined(__CYGWIN__)
|
310
|
+
# define PLATFORM_ID "Cygwin"
|
311
|
+
|
312
|
+
#elif defined(__MINGW32__)
|
313
|
+
# define PLATFORM_ID "MinGW"
|
314
|
+
|
315
|
+
#elif defined(__APPLE__)
|
316
|
+
# define PLATFORM_ID "Darwin"
|
317
|
+
|
318
|
+
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
319
|
+
# define PLATFORM_ID "Windows"
|
320
|
+
|
321
|
+
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
322
|
+
# define PLATFORM_ID "FreeBSD"
|
323
|
+
|
324
|
+
#elif defined(__NetBSD__) || defined(__NetBSD)
|
325
|
+
# define PLATFORM_ID "NetBSD"
|
326
|
+
|
327
|
+
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
328
|
+
# define PLATFORM_ID "OpenBSD"
|
329
|
+
|
330
|
+
#elif defined(__sun) || defined(sun)
|
331
|
+
# define PLATFORM_ID "SunOS"
|
332
|
+
|
333
|
+
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
334
|
+
# define PLATFORM_ID "AIX"
|
335
|
+
|
336
|
+
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
|
337
|
+
# define PLATFORM_ID "IRIX"
|
338
|
+
|
339
|
+
#elif defined(__hpux) || defined(__hpux__)
|
340
|
+
# define PLATFORM_ID "HP-UX"
|
341
|
+
|
342
|
+
#elif defined(__HAIKU__)
|
343
|
+
# define PLATFORM_ID "Haiku"
|
344
|
+
|
345
|
+
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
346
|
+
# define PLATFORM_ID "BeOS"
|
347
|
+
|
348
|
+
#elif defined(__QNX__) || defined(__QNXNTO__)
|
349
|
+
# define PLATFORM_ID "QNX"
|
350
|
+
|
351
|
+
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
352
|
+
# define PLATFORM_ID "Tru64"
|
353
|
+
|
354
|
+
#elif defined(__riscos) || defined(__riscos__)
|
355
|
+
# define PLATFORM_ID "RISCos"
|
356
|
+
|
357
|
+
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
358
|
+
# define PLATFORM_ID "SINIX"
|
359
|
+
|
360
|
+
#elif defined(__UNIX_SV__)
|
361
|
+
# define PLATFORM_ID "UNIX_SV"
|
362
|
+
|
363
|
+
#elif defined(__bsdos__)
|
364
|
+
# define PLATFORM_ID "BSDOS"
|
365
|
+
|
366
|
+
#elif defined(_MPRAS) || defined(MPRAS)
|
367
|
+
# define PLATFORM_ID "MP-RAS"
|
368
|
+
|
369
|
+
#elif defined(__osf) || defined(__osf__)
|
370
|
+
# define PLATFORM_ID "OSF1"
|
371
|
+
|
372
|
+
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
373
|
+
# define PLATFORM_ID "SCO_SV"
|
374
|
+
|
375
|
+
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
376
|
+
# define PLATFORM_ID "ULTRIX"
|
377
|
+
|
378
|
+
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
379
|
+
# define PLATFORM_ID "Xenix"
|
380
|
+
|
381
|
+
#elif defined(__WATCOMC__)
|
382
|
+
# if defined(__LINUX__)
|
383
|
+
# define PLATFORM_ID "Linux"
|
384
|
+
|
385
|
+
# elif defined(__DOS__)
|
386
|
+
# define PLATFORM_ID "DOS"
|
387
|
+
|
388
|
+
# elif defined(__OS2__)
|
389
|
+
# define PLATFORM_ID "OS2"
|
390
|
+
|
391
|
+
# elif defined(__WINDOWS__)
|
392
|
+
# define PLATFORM_ID "Windows3x"
|
393
|
+
|
394
|
+
# else /* unknown platform */
|
395
|
+
# define PLATFORM_ID
|
396
|
+
# endif
|
397
|
+
|
398
|
+
#else /* unknown platform */
|
399
|
+
# define PLATFORM_ID
|
400
|
+
|
401
|
+
#endif
|
402
|
+
|
403
|
+
/* For windows compilers MSVC and Intel we can determine
|
404
|
+
the architecture of the compiler being used. This is because
|
405
|
+
the compilers do not have flags that can change the architecture,
|
406
|
+
but rather depend on which compiler is being used
|
407
|
+
*/
|
408
|
+
#if defined(_WIN32) && defined(_MSC_VER)
|
409
|
+
# if defined(_M_IA64)
|
410
|
+
# define ARCHITECTURE_ID "IA64"
|
411
|
+
|
412
|
+
# elif defined(_M_X64) || defined(_M_AMD64)
|
413
|
+
# define ARCHITECTURE_ID "x64"
|
414
|
+
|
415
|
+
# elif defined(_M_IX86)
|
416
|
+
# define ARCHITECTURE_ID "X86"
|
417
|
+
|
418
|
+
# elif defined(_M_ARM)
|
419
|
+
# if _M_ARM == 4
|
420
|
+
# define ARCHITECTURE_ID "ARMV4I"
|
421
|
+
# elif _M_ARM == 5
|
422
|
+
# define ARCHITECTURE_ID "ARMV5I"
|
423
|
+
# else
|
424
|
+
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
|
425
|
+
# endif
|
426
|
+
|
427
|
+
# elif defined(_M_MIPS)
|
428
|
+
# define ARCHITECTURE_ID "MIPS"
|
429
|
+
|
430
|
+
# elif defined(_M_SH)
|
431
|
+
# define ARCHITECTURE_ID "SHx"
|
432
|
+
|
433
|
+
# else /* unknown architecture */
|
434
|
+
# define ARCHITECTURE_ID ""
|
435
|
+
# endif
|
436
|
+
|
437
|
+
#elif defined(__WATCOMC__)
|
438
|
+
# if defined(_M_I86)
|
439
|
+
# define ARCHITECTURE_ID "I86"
|
440
|
+
|
441
|
+
# elif defined(_M_IX86)
|
442
|
+
# define ARCHITECTURE_ID "X86"
|
443
|
+
|
444
|
+
# else /* unknown architecture */
|
445
|
+
# define ARCHITECTURE_ID ""
|
446
|
+
# endif
|
447
|
+
|
448
|
+
#else
|
449
|
+
# define ARCHITECTURE_ID
|
450
|
+
#endif
|
451
|
+
|
452
|
+
/* Convert integer to decimal digit literals. */
|
453
|
+
#define DEC(n) \
|
454
|
+
('0' + (((n) / 10000000)%10)), \
|
455
|
+
('0' + (((n) / 1000000)%10)), \
|
456
|
+
('0' + (((n) / 100000)%10)), \
|
457
|
+
('0' + (((n) / 10000)%10)), \
|
458
|
+
('0' + (((n) / 1000)%10)), \
|
459
|
+
('0' + (((n) / 100)%10)), \
|
460
|
+
('0' + (((n) / 10)%10)), \
|
461
|
+
('0' + ((n) % 10))
|
462
|
+
|
463
|
+
/* Convert integer to hex digit literals. */
|
464
|
+
#define HEX(n) \
|
465
|
+
('0' + ((n)>>28 & 0xF)), \
|
466
|
+
('0' + ((n)>>24 & 0xF)), \
|
467
|
+
('0' + ((n)>>20 & 0xF)), \
|
468
|
+
('0' + ((n)>>16 & 0xF)), \
|
469
|
+
('0' + ((n)>>12 & 0xF)), \
|
470
|
+
('0' + ((n)>>8 & 0xF)), \
|
471
|
+
('0' + ((n)>>4 & 0xF)), \
|
472
|
+
('0' + ((n) & 0xF))
|
473
|
+
|
474
|
+
/* Construct a string literal encoding the version number components. */
|
475
|
+
#ifdef COMPILER_VERSION_MAJOR
|
476
|
+
char const info_version[] = {
|
477
|
+
'I', 'N', 'F', 'O', ':',
|
478
|
+
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
479
|
+
COMPILER_VERSION_MAJOR,
|
480
|
+
# ifdef COMPILER_VERSION_MINOR
|
481
|
+
'.', COMPILER_VERSION_MINOR,
|
482
|
+
# ifdef COMPILER_VERSION_PATCH
|
483
|
+
'.', COMPILER_VERSION_PATCH,
|
484
|
+
# ifdef COMPILER_VERSION_TWEAK
|
485
|
+
'.', COMPILER_VERSION_TWEAK,
|
486
|
+
# endif
|
487
|
+
# endif
|
488
|
+
# endif
|
489
|
+
']','\0'};
|
490
|
+
#endif
|
491
|
+
|
492
|
+
/* Construct a string literal encoding the version number components. */
|
493
|
+
#ifdef SIMULATE_VERSION_MAJOR
|
494
|
+
char const info_simulate_version[] = {
|
495
|
+
'I', 'N', 'F', 'O', ':',
|
496
|
+
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
497
|
+
SIMULATE_VERSION_MAJOR,
|
498
|
+
# ifdef SIMULATE_VERSION_MINOR
|
499
|
+
'.', SIMULATE_VERSION_MINOR,
|
500
|
+
# ifdef SIMULATE_VERSION_PATCH
|
501
|
+
'.', SIMULATE_VERSION_PATCH,
|
502
|
+
# ifdef SIMULATE_VERSION_TWEAK
|
503
|
+
'.', SIMULATE_VERSION_TWEAK,
|
504
|
+
# endif
|
505
|
+
# endif
|
506
|
+
# endif
|
507
|
+
']','\0'};
|
508
|
+
#endif
|
509
|
+
|
510
|
+
/* Construct the string literal in pieces to prevent the source from
|
511
|
+
getting matched. Store it in a pointer rather than an array
|
512
|
+
because some compilers will just produce instructions to fill the
|
513
|
+
array rather than assigning a pointer to a static array. */
|
514
|
+
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
515
|
+
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
#if !defined(__STDC__)
|
521
|
+
# if defined(_MSC_VER) && !defined(__clang__)
|
522
|
+
# define C_DIALECT "90"
|
523
|
+
# else
|
524
|
+
# define C_DIALECT
|
525
|
+
# endif
|
526
|
+
#elif __STDC_VERSION__ >= 201000L
|
527
|
+
# define C_DIALECT "11"
|
528
|
+
#elif __STDC_VERSION__ >= 199901L
|
529
|
+
# define C_DIALECT "99"
|
530
|
+
#else
|
531
|
+
# define C_DIALECT "90"
|
532
|
+
#endif
|
533
|
+
const char* info_language_dialect_default =
|
534
|
+
"INFO" ":" "dialect_default[" C_DIALECT "]";
|
535
|
+
|
536
|
+
/*--------------------------------------------------------------------------*/
|
537
|
+
|
538
|
+
#ifdef ID_VOID_MAIN
|
539
|
+
void main() {}
|
540
|
+
#else
|
541
|
+
# if defined(__CLASSIC_C__)
|
542
|
+
int main(argc, argv) int argc; char *argv[];
|
543
|
+
# else
|
544
|
+
int main(int argc, char* argv[])
|
545
|
+
# endif
|
546
|
+
{
|
547
|
+
int require = 0;
|
548
|
+
require += info_compiler[argc];
|
549
|
+
require += info_platform[argc];
|
550
|
+
require += info_arch[argc];
|
551
|
+
#ifdef COMPILER_VERSION_MAJOR
|
552
|
+
require += info_version[argc];
|
553
|
+
#endif
|
554
|
+
#ifdef SIMULATE_ID
|
555
|
+
require += info_simulate[argc];
|
556
|
+
#endif
|
557
|
+
#ifdef SIMULATE_VERSION_MAJOR
|
558
|
+
require += info_simulate_version[argc];
|
559
|
+
#endif
|
560
|
+
#if defined(__CRAYXE) || defined(__CRAYXC)
|
561
|
+
require += info_cray[argc];
|
562
|
+
#endif
|
563
|
+
require += info_language_dialect_default[argc];
|
564
|
+
(void)argv;
|
565
|
+
return require;
|
566
|
+
}
|
567
|
+
#endif
|