Skip to content

Commit f5d5710

Browse files
committed
master: CMakeLists.txt: allow dynamic libraries on windows.
1 parent 12b1a6e commit f5d5710

File tree

3 files changed

+14
-19
lines changed

3 files changed

+14
-19
lines changed

CMakeLists.txt

+3-18
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ IF( POLICY CMP0054 )
2121
ENDIF( POLICY CMP0054 )
2222
#
2323
# cppad_version is used by version.sh to get the version number.
24-
SET(cppad_version "20250204")
24+
SET(cppad_version "20250209")
2525
SET(cppad_url "https://coin-or.github.io/CppAD" )
2626
SET(cppad_description "Differentiation of C++ Algorithms" )
2727
IF( NOT DEFINED CMAKE_BUILD_TYPE)
@@ -623,25 +623,10 @@ ENDIF( cppad_has_ipopt )
623623
#
624624
#
625625
# is_cppad_lib_dynamic
626-
STRING( REGEX MATCH "^MSYS" is_msys "${CMAKE_SYSTEM_NAME}" )
627-
STRING( REGEX MATCH "^CYGWIN" is_cygwin "${CMAKE_SYSTEM_NAME}" )
628-
STRING( REGEX MATCH "^Windows" is_windows "${CMAKE_SYSTEM_NAME}" )
629-
IF( is_msys OR is_cygwin OR is_windows )
630-
IF( NOT cppad_static_lib )
631-
MESSAGE(WARNING
632-
"This systems uses windows dynamic libraries.
633-
The cppad library must be static for this case.
634-
Ignoring fact that cppad_static_lib is FALSE.
635-
"
636-
)
637-
ENDIF( )
626+
IF( cppad_static_lib )
638627
SET(is_cppad_lib_dynamic 0)
639628
ELSE( )
640-
IF( cppad_static_lib )
641-
SET(is_cppad_lib_dynamic 0)
642-
ELSE( )
643-
SET(is_cppad_lib_dynamic 1)
644-
ENDIF( )
629+
SET(is_cppad_lib_dynamic 1)
645630
ENDIF( )
646631
print_variable(is_cppad_lib_dynamic)
647632
#

appendix/whats_new/2025.xrst

+10
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ Release Notes for 2025
1616
mm-dd
1717
*****
1818

19+
02-09
20+
=====
21+
Systems that use windows dll files would always build a static
22+
version of the cppad library; i.e., the
23+
`cmake@cppad_static_lib` flag was ignored in this case.
24+
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+
28+
1929
02-02
2030
=====
2131
The rpath in may not have been set properly in

user_guide.xrst

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Versions
4141
:widths: auto
4242

4343
* - This version
44-
- cppad-20250204
44+
- cppad-20250209
4545
* - Documentation for latest version
4646
- `latest <https://cppad.readthedocs.io/latest>`_
4747
* - Documentation for most recent stable version

0 commit comments

Comments
 (0)