@@ -107,14 +107,6 @@ if(USE_CCACHE)
107
107
endif (CCACHE_FOUND )
108
108
endif ()
109
109
110
- # If projects are statically importing glslang targets into a shared library
111
- # then they'll likely need to build with -fPIC. This can be enabled by setting
112
- # GLSLANG_BUILD_PIC to 1 before calling add_subdirectory() to import glslang.
113
- # Note: -fPIC is automatically used when BUILD_SHARED_LIBS is enabled.
114
- if (NOT DEFINED GLSLANG_BUILD_PIC )
115
- option (GLSLANG_BUILD_PIC "Compile glslang with -fPIC" OFF )
116
- endif ()
117
-
118
110
# Precompiled header macro. Parameters are source file list and filename for pch cpp file.
119
111
macro (glslang_pch SRCS PCHCPP )
120
112
if (MSVC AND CMAKE_GENERATOR MATCHES "^Visual Studio" AND NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND ENABLE_PCH )
@@ -160,9 +152,6 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
160
152
add_compile_options (-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs
161
153
-Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions )
162
154
add_compile_options (-Wno-reorder ) # disable this from -Wall, since it happens all over.
163
- if (BUILD_SHARED_LIBS OR GLSLANG_BUILD_PIC )
164
- add_compile_options (-fPIC )
165
- endif ()
166
155
if (NOT ENABLE_RTTI )
167
156
add_compile_options (-fno-rtti )
168
157
endif ()
@@ -183,9 +172,6 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
183
172
add_compile_options (-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
184
173
-Wunused-parameter -Wunused-value -Wunused-variable )
185
174
add_compile_options (-Wno-reorder ) # disable this from -Wall, since it happens all over.
186
- if (BUILD_SHARED_LIBS OR GLSLANG_BUILD_PIC )
187
- add_compile_options (-fPIC )
188
- endif ()
189
175
if (NOT ENABLE_RTTI )
190
176
add_compile_options (-fno-rtti )
191
177
endif ()
0 commit comments