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:
Brad King 2014-07-02 14:40:59 -04:00
parent 61be345115
commit 54bf5858cd
2 changed files with 2 additions and 8 deletions

View File

@ -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)

View File

@ -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})