File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ option(SWIFT_ENABLE_MODULE_INTERFACES
66
66
"Generate .swiftinterface files alongside .swiftmodule files"
67
67
"${SWIFT_STDLIB_STABLE_ABI} " )
68
68
69
+ option (SWIFT_COMPILE_DIFFERENTIATION_WITHOUT_TGMATH
70
+ "Build Differentation without tgmath (and dependency on platform runtime libraries)"
71
+ FALSE )
72
+
69
73
#
70
74
# End of user-configurable options.
71
75
#
Original file line number Diff line number Diff line change @@ -87,7 +87,15 @@ if(SWIFT_BUILD_STDLIB)
87
87
add_subdirectory (SwiftOnoneSupport )
88
88
89
89
if (SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING )
90
- add_subdirectory (Differentiation )
90
+ if (SWIFT_COMPILE_DIFFERENTIATION_WITHOUT_TGMATH )
91
+ # Use a different CMakeLists.txt for this configuration
92
+ # while sharing the bulk of the code
93
+ # This way we will reduce any side effect on the main configuration
94
+ # and increase the readability of the CMake code
95
+ add_subdirectory (Differentiation_NoTgMath )
96
+ else ()
97
+ add_subdirectory (Differentiation )
98
+ endif ()
91
99
endif ()
92
100
93
101
if (SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY )
Original file line number Diff line number Diff line change
1
+ set (SOURCES_FOLDER ../Differentiation )
2
+
3
+ add_swift_target_library (swift_Differentiation ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
4
+ ${SOURCES_FOLDER} /Differentiable.swift
5
+ ${SOURCES_FOLDER} /DifferentialOperators.swift
6
+ ${SOURCES_FOLDER} /DifferentiationUtilities.swift
7
+ ${SOURCES_FOLDER} /AnyDifferentiable.swift
8
+ ${SOURCES_FOLDER} /ArrayDifferentiation.swift
9
+ ${SOURCES_FOLDER} /OptionalDifferentiation.swift
10
+
11
+ GYB_SOURCES
12
+ ${SOURCES_FOLDER} /FloatingPointDifferentiation.swift.gyb
13
+ ${SOURCES_FOLDER} /SIMDDifferentiation.swift.gyb
14
+
15
+ SWIFT_COMPILE_FLAGS
16
+ ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
17
+ -parse-stdlib
18
+ LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS} "
19
+ DARWIN_INSTALL_NAME_DIR "@rpath"
20
+ INSTALL_IN_COMPONENT stdlib )
You can’t perform that action at this time.
0 commit comments