Skip to content

Commit

Permalink
Merge #58: cmake: Skip superfluous PIC/PIE warning for Windows
Browse files Browse the repository at this point in the history
52447c3 fixup! cmake: Add position independent code support (Hennadii Stepanov)

Pull request description:

  PIC/PIE is not a thing in Windows PE format. Therefore, warnings are rather making noise than providing valuable feedback.

ACKs for top commit:
  TheCharlatan:
    ACK 52447c3

Tree-SHA512: f7d3c134d72ff2148de551b287e9ae53e8a4d3ac6ee176cddc92bb21eeaca3cd892f53e1d6b143d7114e0a937982c72bd5429ba42be0883b4f79877989c85af4
  • Loading branch information
hebasto committed Dec 12, 2023
2 parents d641c5d + 52447c3 commit 8ba1ed4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ include(CheckPIESupported)
check_pie_supported(OUTPUT_VARIABLE check_pie_output LANGUAGES CXX)
if(CMAKE_CXX_LINK_PIE_SUPPORTED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
else()
elseif(NOT WIN32)
# The warning is superfluous for Windows.
message(WARNING "PIE is not supported at link time: ${check_pie_output}")
list(APPEND configure_warnings "Position independent code disabled.")
endif()
Expand Down

0 comments on commit 8ba1ed4

Please sign in to comment.