Skip to content

Commit 1f7592e

Browse files
authored
Export symbols on Windows and set PIC flag for Unix (#646)
1 parent 8eaa778 commit 1f7592e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ set(SRC
9494

9595
add_library(${PROJECT_NAME} ${SRC})
9696

97+
set_target_properties(
98+
${PROJECT_NAME}
99+
PROPERTIES
100+
POSITION_INDEPENDENT_CODE ON
101+
WINDOWS_EXPORT_ALL_SYMBOLS ON
102+
)
103+
97104
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU AND CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0)
98105
target_compile_options(
99106
${PROJECT_NAME}

0 commit comments

Comments
 (0)