Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
e8c9fd60
Unverified
Commit
e8c9fd60
authored
Jul 07, 2020
by
John Kessenich
Committed by
GitHub
Jul 07, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2326 from ben-clayton/always_pic
Remove GLSLANG_BUILD_PIC flag
parents
ba17d8bc
3604be15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
15 deletions
+4
-15
CMakeLists.txt
CMakeLists.txt
+0
-14
CMakeLists.txt
glslang/CMakeLists.txt
+4
-1
No files found.
CMakeLists.txt
View file @
e8c9fd60
...
...
@@ -107,14 +107,6 @@ if(USE_CCACHE)
endif
(
CCACHE_FOUND
)
endif
()
# If projects are statically importing glslang targets into a shared library
# then they'll likely need to build with -fPIC. This can be enabled by setting
# GLSLANG_BUILD_PIC to 1 before calling add_subdirectory() to import glslang.
# Note: -fPIC is automatically used when BUILD_SHARED_LIBS is enabled.
if
(
NOT DEFINED GLSLANG_BUILD_PIC
)
option
(
GLSLANG_BUILD_PIC
"Compile glslang with -fPIC"
OFF
)
endif
()
# Precompiled header macro. Parameters are source file list and filename for pch cpp file.
macro
(
glslang_pch SRCS PCHCPP
)
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")
add_compile_options
(
-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs
-Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions
)
add_compile_options
(
-Wno-reorder
)
# disable this from -Wall, since it happens all over.
if
(
BUILD_SHARED_LIBS OR GLSLANG_BUILD_PIC
)
add_compile_options
(
-fPIC
)
endif
()
if
(
NOT ENABLE_RTTI
)
add_compile_options
(
-fno-rtti
)
endif
()
...
...
@@ -183,9 +172,6 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
add_compile_options
(
-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
-Wunused-parameter -Wunused-value -Wunused-variable
)
add_compile_options
(
-Wno-reorder
)
# disable this from -Wall, since it happens all over.
if
(
BUILD_SHARED_LIBS OR GLSLANG_BUILD_PIC
)
add_compile_options
(
-fPIC
)
endif
()
if
(
NOT ENABLE_RTTI
)
add_compile_options
(
-fno-rtti
)
endif
()
...
...
glslang/CMakeLists.txt
View file @
e8c9fd60
...
...
@@ -50,6 +50,8 @@ endif(EMSCRIPTEN OR ENABLE_GLSLANG_JS)
add_library
(
GenericCodeGen STATIC
GenericCodeGen/CodeGen.cpp
GenericCodeGen/Link.cpp
)
set_property
(
TARGET GenericCodeGen PROPERTY POSITION_INDEPENDENT_CODE ON
)
set_property
(
TARGET GenericCodeGen PROPERTY FOLDER glslang
)
################################################################################
# MachineIndependent
...
...
@@ -129,7 +131,8 @@ if(ENABLE_HLSL)
endif
(
ENABLE_HLSL
)
add_library
(
MachineIndependent STATIC
${
MACHINEINDEPENDENT_SOURCES
}
${
MACHINEINDEPENDENT_HEADERS
}
)
set_property
(
TARGET MachineIndependent PROPERTY POSITION_INDEPENDENT_CODE ON
)
set_property
(
TARGET MachineIndependent PROPERTY FOLDER glslang
)
glslang_pch
(
SOURCES MachineIndependent/pch.cpp
)
target_link_libraries
(
MachineIndependent PRIVATE OGLCompiler OSDependent GenericCodeGen
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment