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
fd593d5f
Unverified
Commit
fd593d5f
authored
Apr 10, 2020
by
Malacath-92
Committed by
GitHub
Apr 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of all warnings with MSVC and clang-cl (#2177)
parent
75de196c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
CMakeLists.txt
CMakeLists.txt
+4
-4
resource_limits_c.cpp
StandAlone/resource_limits_c.cpp
+14
-0
No files found.
CMakeLists.txt
View file @
fd593d5f
...
@@ -75,7 +75,7 @@ endif()
...
@@ -75,7 +75,7 @@ endif()
# Precompiled header macro. Parameters are source file list and filename for pch cpp file.
# Precompiled header macro. Parameters are source file list and filename for pch cpp file.
macro
(
glslang_pch SRCS PCHCPP
)
macro
(
glslang_pch SRCS PCHCPP
)
if
(
MSVC AND CMAKE_GENERATOR MATCHES
"^Visual Studio"
AND ENABLE_PCH
)
if
(
MSVC AND CMAKE_GENERATOR MATCHES
"^Visual Studio"
AND
NOT
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
AND
ENABLE_PCH
)
set
(
PCH_NAME
"$(IntDir)
\\
pch.pch"
)
set
(
PCH_NAME
"$(IntDir)
\\
pch.pch"
)
# make source files use/depend on PCH_NAME
# make source files use/depend on PCH_NAME
set_source_files_properties
(
${${
SRCS
}}
PROPERTIES COMPILE_FLAGS
"/Yupch.h /FIpch.h /Fp
${
PCH_NAME
}
/Zm300"
OBJECT_DEPENDS
"
${
PCH_NAME
}
"
)
set_source_files_properties
(
${${
SRCS
}}
PROPERTIES COMPILE_FLAGS
"/Yupch.h /FIpch.h /Fp
${
PCH_NAME
}
/Zm300"
OBJECT_DEPENDS
"
${
PCH_NAME
}
"
)
...
@@ -124,14 +124,14 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
...
@@ -124,14 +124,14 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
if
(
NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"9.0.0"
)
if
(
NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"9.0.0"
)
add_compile_options
(
-Werror=deprecated-copy
)
add_compile_options
(
-Werror=deprecated-copy
)
endif
()
endif
()
elseif
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
)
elseif
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
AND NOT MSVC
)
add_compile_options
(
-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
add_compile_options
(
-Wall -Wuninitialized -Wunused -Wunused-local-typedefs
-Wunused-parameter -Wunused-value -Wunused-variable
)
-Wunused-parameter -Wunused-value -Wunused-variable
)
add_compile_options
(
-Wno-reorder
)
# disable this from -Wall, since it happens all over.
add_compile_options
(
-Wno-reorder
)
# disable this from -Wall, since it happens all over.
if
(
NOT ENABLE_RTTI
)
if
(
NOT ENABLE_RTTI
)
add_compile_options
(
-fno-rtti
)
add_compile_options
(
-fno-rtti
)
endif
()
endif
()
elseif
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"MSVC"
)
elseif
(
MSVC
)
if
(
NOT ENABLE_RTTI
)
if
(
NOT ENABLE_RTTI
)
add_compile_options
(
/GR-
)
# Disable RTTI
add_compile_options
(
/GR-
)
# Disable RTTI
endif
()
endif
()
...
@@ -142,7 +142,7 @@ if(ENABLE_GLSLANG_JS)
...
@@ -142,7 +142,7 @@ if(ENABLE_GLSLANG_JS)
add_compile_options
(
/Os /GR-
)
add_compile_options
(
/Os /GR-
)
else
()
else
()
add_compile_options
(
-Os -fno-exceptions
)
add_compile_options
(
-Os -fno-exceptions
)
if
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
)
if
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
AND NOT MSVC
)
add_compile_options
(
-Wno-unused-parameter
)
add_compile_options
(
-Wno-unused-parameter
)
add_compile_options
(
-Wno-unused-variable -Wno-unused-const-variable
)
add_compile_options
(
-Wno-unused-variable -Wno-unused-const-variable
)
endif
()
endif
()
...
...
StandAlone/resource_limits_c.cpp
View file @
fd593d5f
...
@@ -37,6 +37,14 @@ const glslang_resource_t* glslang_default_resource(void)
...
@@ -37,6 +37,14 @@ const glslang_resource_t* glslang_default_resource(void)
return
reinterpret_cast
<
const
glslang_resource_t
*>
(
&
glslang
::
DefaultTBuiltInResource
);
return
reinterpret_cast
<
const
glslang_resource_t
*>
(
&
glslang
::
DefaultTBuiltInResource
);
}
}
#if defined(__clang__) || defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4996)
#endif
const
char
*
glslang_default_resource_string
()
const
char
*
glslang_default_resource_string
()
{
{
std
::
string
cpp_str
=
glslang
::
GetDefaultTBuiltInResourceString
();
std
::
string
cpp_str
=
glslang
::
GetDefaultTBuiltInResourceString
();
...
@@ -45,6 +53,12 @@ const char* glslang_default_resource_string()
...
@@ -45,6 +53,12 @@ const char* glslang_default_resource_string()
return
c_str
;
return
c_str
;
}
}
#if defined(__clang__) || defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(_MSC_VER)
#pragma warning(pop)
#endif
void
glslang_decode_resource_limits
(
glslang_resource_t
*
resources
,
char
*
config
)
void
glslang_decode_resource_limits
(
glslang_resource_t
*
resources
,
char
*
config
)
{
{
glslang
::
DecodeResourceLimits
(
reinterpret_cast
<
TBuiltInResource
*>
(
resources
),
config
);
glslang
::
DecodeResourceLimits
(
reinterpret_cast
<
TBuiltInResource
*>
(
resources
),
config
);
...
...
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