@@ -73,7 +73,6 @@ macro(myproject_setup_options)
7373 if (NOT PROJECT_IS_TOP_LEVEL OR myproject_PACKAGING_MAINTAINER_MODE)
7474 option (myproject_ENABLE_IPO "Enable IPO/LTO" OFF )
7575 option (myproject_WARNINGS_AS_ERRORS "Treat Warnings As Errors" OFF )
76- option (myproject_ENABLE_USER_LINKER "Enable user-selected linker" OFF )
7776 option (myproject_ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" OFF )
7877 option (myproject_ENABLE_SANITIZER_LEAK "Enable leak sanitizer" OFF )
7978 option (myproject_ENABLE_SANITIZER_UNDEFINED "Enable undefined sanitizer" OFF )
@@ -87,7 +86,6 @@ macro(myproject_setup_options)
8786 else ()
8887 option (myproject_ENABLE_IPO "Enable IPO/LTO" ON )
8988 option (myproject_WARNINGS_AS_ERRORS "Treat Warnings As Errors" ON )
90- option (myproject_ENABLE_USER_LINKER "Enable user-selected linker" OFF )
9189 option (myproject_ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" ${SUPPORTS_ASAN} )
9290 option (myproject_ENABLE_SANITIZER_LEAK "Enable leak sanitizer" OFF )
9391 option (myproject_ENABLE_SANITIZER_UNDEFINED "Enable undefined sanitizer" ${SUPPORTS_UBSAN} )
@@ -104,7 +102,6 @@ macro(myproject_setup_options)
104102 mark_as_advanced (
105103 myproject_ENABLE_IPO
106104 myproject_WARNINGS_AS_ERRORS
107- myproject_ENABLE_USER_LINKER
108105 myproject_ENABLE_SANITIZER_ADDRESS
109106 myproject_ENABLE_SANITIZER_LEAK
110107 myproject_ENABLE_SANITIZER_UNDEFINED
@@ -170,13 +167,10 @@ macro(myproject_local_options)
170167 ""
171168 "" )
172169
173- # Linker and sanitizers not supported in Emscripten
174- if (NOT EMSCRIPTEN)
175- if (myproject_ENABLE_USER_LINKER)
176- include (cmake/Linker.cmake )
177- myproject_configure_linker (myproject_options )
178- endif ()
170+ include (cmake/Linker.cmake )
171+ # Must configure each target with linker options, we're avoiding setting it globally for now
179172
173+ if (NOT EMSCRIPTEN)
180174 include (cmake/Sanitizers.cmake )
181175 myproject_enable_sanitizers (
182176 myproject_options
0 commit comments