File tree 2 files changed +14
-6
lines changed
2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
1
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
2
2
# SPDX-FileCopyrightText: Bradley M. Bell <[email protected] >
3
- # SPDX-FileContributor: 2003-22 Bradley M. Bell
3
+ # SPDX-FileContributor: 2003-25 Bradley M. Bell
4
4
# ----------------------------------------------------------------------------
5
5
# Build the cppad_ipopt/src library
6
6
# Inherit build type from ../CMakeList.txt
@@ -18,8 +18,15 @@ SET(source_list
18
18
)
19
19
# END_SORT_THIS_LINE_MINUS_2
20
20
21
- ADD_LIBRARY (cppad_ipopt ${source_list} )
21
+ # set_compiler_flags
22
22
set_compile_flags( cppad_ipopt "${cppad_debug_which} " "${source_list} " )
23
+ #
24
+ # add_library
25
+ IF ( "${is_cppad_lib_dynamic} " STREQUAL "0" )
26
+ ADD_LIBRARY ( cppad_ipopt STATIC ${source_list} )
27
+ ELSEIF ( "${is_cppad_lib_dynamic} " STREQUAL "1" )
28
+ ADD_LIBRARY ( cppad_ipopt SHARED ${source_list} )
29
+ ENDIF ( )
23
30
24
31
# install(FILES files... DESTINATION <dir>
25
32
# [PERMISSIONS permissions...]
Original file line number Diff line number Diff line change @@ -41,14 +41,15 @@ IF( cppad_has_cppadcg )
41
41
SET (source_list ${source_list} code_gen_fun.cpp)
42
42
ENDIF ( cppad_has_cppadcg )
43
43
#
44
+ # set_compile_flags
44
45
set_compile_flags(cppad_lib "${cppad_debug_which} " "${source_list} " )
45
46
#
46
- # is_windows
47
+ # add_library
47
48
IF ( "${is_cppad_lib_dynamic} " STREQUAL "0" )
48
- MESSAGE ( STATUS "Windows system so building static cppad_lib" )
49
+ MESSAGE ( STATUS "Building static cppad_lib" )
49
50
ADD_LIBRARY ( cppad_lib STATIC ${source_list} )
50
51
ELSEIF ( "${is_cppad_lib_dynamic} " STREQUAL "1" )
51
- MESSAGE ( STATUS "Not Windows system so building shared cppad_lib" )
52
+ MESSAGE ( STATUS "Building shared cppad_lib" )
52
53
ADD_LIBRARY ( cppad_lib SHARED ${source_list} )
53
54
SET_TARGET_PROPERTIES ( cppad_lib PROPERTIES
54
55
SOVERSION ${soversion}
@@ -59,7 +60,7 @@ ELSEIF( "${is_cppad_lib_dynamic}" STREQUAL "1" )
59
60
IF ( dl_LIBRARY )
60
61
TARGET_LINK_LIBRARIES (cppad_lib ${dl_LIBRARY} )
61
62
ENDIF ( dl_LIBRARY )
62
- ELSE ( " ${is_cppad_lib_dynamic} " == "0" )
63
+ ELSE ( )
63
64
MESSAGE (FATAL_ERROR "CMkakeLists.txt Error: invalid is_cppad_lib_dynamic" )
64
65
ENDIF ( )
65
66
#
You can’t perform that action at this time.
0 commit comments