Skip to content

Commit

Permalink
CMake: request PIC through the buildsystem.
Browse files Browse the repository at this point in the history
whitequark committed Mar 4, 2017
1 parent f3e2ece commit cac2097
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)

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

1 change: 0 additions & 1 deletion src/gpcosim/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -8,4 +8,3 @@ set_target_properties(gpcosim PROPERTIES SUFFIX ".vpi")

target_link_libraries(gpcosim
gpdevboard log)

0 comments on commit cac2097

Please sign in to comment.