Skip to content

Commit cac2097

Browse files
committedMar 4, 2017
CMake: request PIC through the buildsystem.
1 parent f3e2ece commit cac2097

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed
 

‎CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)
1414
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)
1515

1616
# Compiler configuration
17+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
1718
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
1819
set(EXTRA_WARNINGS "-Wcast-align -Winit-self -Wmissing-declarations")
1920
set(EXTRA_WARNINGS "${EXTRA_WARNINGS} -Wswitch -Wwrite-strings")
@@ -24,7 +25,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
2425
set(CMAKE_LINK_FLAGS "-ggdb")
2526
endif()
2627
if(MSYS)
27-
string(REPLACE "-fPIC" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
2828
add_definitions(-D__USE_MINGW_ANSI_STDIO=1)
2929
endif()
3030

‎src/gpcosim/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ set_target_properties(gpcosim PROPERTIES SUFFIX ".vpi")
88

99
target_link_libraries(gpcosim
1010
gpdevboard log)
11-

0 commit comments

Comments
 (0)
Please sign in to comment.