File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -120,12 +120,12 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wno-unused-variable -
120120
121121set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-deprecated-copy -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-pedantic -Wformat=2 -Wformat-security -Wshadow -Wwrite-strings -Wmissing-include-dirs" )
122122
123- if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
124- set (CFLAGS "$ENV{CFLAGS} " "-Wl,--export-dynamic " )
125- endif ()
123+ # if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
124+ # set(CFLAGS "$ENV{CFLAGS} " "-Wl,--export-dynamic ")
125+ # endif()
126126
127- string (REPLACE "" "" LOCAL_CFLAGS ${CFLAGS} )
128- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} $ENV{CFLAGS} ${LOCAL_CFLAGS} " )
127+ # string(REPLACE "" "" LOCAL_CFLAGS ${CFLAGS})
128+ # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} $ENV{CFLAGS} ${LOCAL_CFLAGS}")
129129
130130# #######################################
131131# find dependency #
@@ -348,6 +348,9 @@ set(LIB_SOURCE ${LIB_SOURCE} ${cache_source} ${reader_source} ${dataStructure_so
348348SET (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
349349
350350add_library (${PROJECT_NAME} ${LIB_SOURCE} )
351+ # target_compile_options(${PROJECT_NAME} PRIVATE -fPIC)
352+ target_link_options (${PROJECT_NAME} PRIVATE -Wl,--export-dynamic )
353+
351354
352355# add_library(${PROJECT_NAME} SHARED ${LIB_SOURCE})
353356set_target_properties (${PROJECT_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} )
Original file line number Diff line number Diff line change @@ -9,3 +9,6 @@ add_subdirectory(prefetch)
99
1010add_library (cachelib cache .c cacheObj.c )
1111target_link_libraries (cachelib dataStructure )
12+
13+ target_compile_options (cachelib PRIVATE -fPIC )
14+ target_link_options (cachelib PRIVATE -Wl,--export-dynamic )
You can’t perform that action at this time.
0 commit comments