fix clang issue
clang-9: error: argument unused during compilation: '-pie' [-Werror,-Wunused-command-line-argument]
clang-9: error: argument unused during compilation: '-pie' [-Werror,-Wunused-command-line-argument]
@@ -118,9 +118,11 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebI
endif()
# Linker options
+ if (NOT ${CMAKE_C_COMPILER} MATCHES "clang")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pie")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
endif()
+endif()
# Check if support for C++ 11/14/0x is available
check_cxx_compiler_flag("-std=c++14" COMPILER_SUPPORTS_CXX14)
