Tests: Resolve TODO comment left in ObjectLibrary test
We now have a generic way to add -fPIC without explicitly modifying CMAKE_C_FLAGS, so use it.
This commit is contained in:
parent
61be345115
commit
54bf5858cd
|
@ -1,9 +1,6 @@
|
|||
project(ObjectLibraryA C)
|
||||
# Add -fPIC so objects can be used in shared libraries.
|
||||
# TODO: Need property for this.
|
||||
if(CMAKE_SHARED_LIBRARY_C_FLAGS AND NOT WATCOM)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS} ${CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
add_definitions(-DA_DEF)
|
||||
|
||||
|
|
|
@ -5,10 +5,7 @@ if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
|
|||
endif()
|
||||
|
||||
# Add -fPIC so objects can be used in shared libraries.
|
||||
# TODO: Need property for this.
|
||||
if(CMAKE_SHARED_LIBRARY_C_FLAGS AND NOT WATCOM)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS} ${CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
add_library(B OBJECT b1.c b2.c)
|
||||
target_include_directories(B PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
Loading…
Reference in New Issue