[CMAKE] Clear CMAKE_<LANGUAGE>_IMPLICIT_LINK_LIBRARIES and

_IMPLICIT_LINK_DIRECTORIES

Othrewise, if you link a RC module with a static C library (as done for
fusion DLLs), you get the standard C libraries from GCC. This is not
what we want.

This might have to be done for MSVC builds. Check build.ninja to verify
this.
This commit is contained in:
Jérôme Gardou 2019-04-06 16:55:10 +02:00 committed by Jérôme Gardou
parent 157a509a0f
commit f489c3fd07
2 changed files with 7 additions and 0 deletions

View file

@ -3,4 +3,6 @@ foreach(lang C CXX ASM)
set(CMAKE_${lang}_FLAGS_MINSIZEREL "-Os -DNDEBUG") set(CMAKE_${lang}_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_${lang}_FLAGS_RELEASE "") set(CMAKE_${lang}_FLAGS_RELEASE "")
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG") set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
set(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "")
set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "")
endforeach() endforeach()

View file

@ -63,6 +63,8 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_COMPILE_OPTIONS_PIE "") set(CMAKE_CXX_COMPILE_OPTIONS_PIE "")
set(CMAKE_SHARED_LIBRARY_C_FLAGS "") set(CMAKE_SHARED_LIBRARY_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
set(CMAKE_SHARED_MODULE_C_FLAGS "")
set(CMAKE_SHARED_MODULE_CXX_FLAGS "")
set(CMAKE_ASM_FLAGS_DEBUG "") set(CMAKE_ASM_FLAGS_DEBUG "")
set(CMAKE_C_FLAGS_DEBUG "") set(CMAKE_C_FLAGS_DEBUG "")
set(CMAKE_CXX_FLAGS_DEBUG "") set(CMAKE_CXX_FLAGS_DEBUG "")
@ -105,6 +107,9 @@ endif()
if(DEFINED CMAKE_SHARED_LIBRARY_ASM_FLAGS) if(DEFINED CMAKE_SHARED_LIBRARY_ASM_FLAGS)
string(REPLACE "-fPIC" "" CMAKE_SHARED_LIBRARY_ASM_FLAGS ${CMAKE_SHARED_LIBRARY_ASM_FLAGS}) string(REPLACE "-fPIC" "" CMAKE_SHARED_LIBRARY_ASM_FLAGS ${CMAKE_SHARED_LIBRARY_ASM_FLAGS})
endif() endif()
if(DEFINED CMAKE_SHARED_MODULE_ASM_FLAGS)
string(REPLACE "-fPIC" "" CMAKE_SHARED_MODULE_ASM_FLAGS ${CMAKE_SHARED_MODULE_ASM_FLAGS})
endif()
# Tuning # Tuning
if(ARCH STREQUAL "i386") if(ARCH STREQUAL "i386")