File tree Expand file tree Collapse file tree 4 files changed +14247
-1332
lines changed Expand file tree Collapse file tree 4 files changed +14247
-1332
lines changed Original file line number Diff line number Diff line change @@ -67,12 +67,35 @@ if(LAPACKE_WITH_TMG)
67
67
endif ()
68
68
list (APPEND SOURCES ${UTILS} )
69
69
70
- add_library (${LAPACKELIB} ${SOURCES} )
70
+ add_library (${LAPACKELIB} _obj OBJECT ${SOURCES} )
71
+ set_target_properties (${LAPACKELIB} _obj PROPERTIES POSITION_INDEPENDENT_CODE ON )
72
+
73
+ if (BUILD_INDEX64_EXT_API )
74
+ # 64bit Integer Extended Interface
75
+ set (SOURCES_64_C )
76
+ list (APPEND SOURCES_64_C ${SOURCES} )
77
+ list (REMOVE_ITEM SOURCES_64_C src/lapacke_nancheck.c )
78
+ list (REMOVE_ITEM SOURCES_64_C utils/lapacke_make_complex_float.c )
79
+ list (REMOVE_ITEM SOURCES_64_C utils/lapacke_make_complex_double.c )
80
+ add_library (${LAPACKELIB} _64_obj OBJECT ${SOURCES_64_C} )
81
+ set_target_properties (${LAPACKELIB} _64_obj PROPERTIES
82
+ POSITION_INDEPENDENT_CODE ON )
83
+ target_compile_options (${LAPACKELIB} _64_obj PRIVATE
84
+ -DLAPACK_ILP64
85
+ -DLAPACKE_API64
86
+ -DWeirdNEC
87
+ -DCBLAS_API64 )
88
+ endif ()
89
+
90
+ add_library (${LAPACKELIB} $< TARGET_OBJECTS:${LAPACKELIB} _obj>
91
+ $< $< BOOL:${BUILD_INDEX64_EXT_API} > : $< TARGET_OBJECTS:${LAPACKELIB} _64_obj> > )
92
+
71
93
set_target_properties (
72
94
${LAPACKELIB} PROPERTIES
73
95
LINKER_LANGUAGE C
74
96
VERSION ${LAPACK_VERSION}
75
97
SOVERSION ${LAPACK_MAJOR_VERSION}
98
+ POSITION_INDEPENDENT_CODE ON
76
99
)
77
100
target_include_directories (${LAPACKELIB} PUBLIC
78
101
$< BUILD_INTERFACE:${LAPACK_BINARY_DIR} /include>
You can’t perform that action at this time.
0 commit comments