File tree 3 files changed +23
-10
lines changed
3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -217,15 +217,25 @@ command_line_arg(cppad_tape_addr_type "unsigned int" STRING
217
217
"type used to identify variables on one tape, size must be <= sizeof(size_t)"
218
218
)
219
219
#
220
- # cppad_static_lib
221
- command_line_arg(cppad_static_lib FALSE BOOL
222
- "If true (false) the cppad library will be static (shared)"
223
- )
224
- #
225
220
# cppad_debug_and_release
226
221
command_line_arg(cppad_debug_and_release TRUE BOOL
227
222
"If true the cppad library and tests will be able to mix debug and release"
228
223
)
224
+ #
225
+ # cppad_static_lib
226
+ STRING ( REGEX MATCH "^MSYS" is_msys "${CMAKE_SYSTEM_NAME} " )
227
+ STRING ( REGEX MATCH "^CYGWIN" is_cygwin "${CMAKE_SYSTEM_NAME} " )
228
+ STRING ( REGEX MATCH "^Windows" is_windows "${CMAKE_SYSTEM_NAME} " )
229
+ IF ( is_msys OR is_cygwin OR is_windows )
230
+ SET (default_cppad_static_lib TRUE )
231
+ ELSE ( )
232
+ SET (default_cppad_static_lib FALSE )
233
+ ENDIF ( )
234
+ #
235
+ # cppad_static_lib
236
+ command_line_arg(cppad_static_lib ${default_cppad_static_lib} BOOL
237
+ "If true (false) the cppad library will be static (shared)"
238
+ )
229
239
# ----------------------------------------------------------------------------
230
240
#
231
241
# Ensure c++11 support
Original file line number Diff line number Diff line change 8
8
dll
9
9
jit
10
10
rpath
11
+ msys
11
12
}
12
13
13
14
Release Notes for 2025
@@ -18,12 +19,14 @@ mm-dd
18
19
19
20
02-09
20
21
=====
21
- Systems that use windows dll files would always build a static
22
+ Systems that use windows dll files,
23
+ (msys, cygwin, and windows) would always build a static
22
24
version of the cppad library; i.e., the
23
25
`cmake@cppad_static_lib` flag was ignored in this case.
24
26
This has been changed so that the cppad_static_lib flag is always respected.
25
- If you have trouble linking on a windows system, perhaps setting
26
- this flag to true will help.
27
+ The default value for *cppad_static_lib* on msys, cygwin, and windows is true
28
+ and on other systems it is false; i.e., if you do not specify cppad_static_lib
29
+ you will get the same result as before this change.
27
30
28
31
29
32
02-02
Original file line number Diff line number Diff line change @@ -410,8 +410,8 @@ will build the corresponding documentation in the
410
410
411
411
cppad_static_lib
412
412
****************
413
- The default value for this option is false.
414
- If it is true ( false)
413
+ The default value for this option is true on
414
+ ``msys``, ``cygwin`` and ``Windows`` and false otherwise.
415
415
the cppad library will be a static (shared) library.
416
416
If the target system uses windows dlls, this setting should be true and
417
417
if it is false, a warning will be issued and it will be ignored.
You can’t perform that action at this time.
0 commit comments