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
0638724b
Unverified
Commit
0638724b
authored
Jul 03, 2020
by
John Kessenich
Committed by
GitHub
Jul 03, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2316 from ben-clayton/fix-2315
Don't use add_link_options() on old CMake versions
parents
73e001a7
4af48da4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
CMakeLists.txt
CMakeLists.txt
+12
-4
No files found.
CMakeLists.txt
View file @
0638724b
...
@@ -165,8 +165,12 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
...
@@ -165,8 +165,12 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
add_compile_options
(
-Werror=deprecated-copy
)
add_compile_options
(
-Werror=deprecated-copy
)
endif
()
endif
()
# Error if there's symbols that are not found at link time.
if
(
NOT CMAKE_VERSION VERSION_LESS
"3.13"
)
add_link_options
(
"-Wl,--no-undefined"
)
# Error if there's symbols that are not found at link time.
# add_link_options() was added in CMake 3.13 - if using an earlier
# version don't set this - it should be caught by presubmits anyway.
add_link_options
(
"-Wl,--no-undefined"
)
endif
()
elseif
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
AND NOT MSVC
)
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
)
...
@@ -181,8 +185,12 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
...
@@ -181,8 +185,12 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC)
add_compile_options
(
-fno-exceptions
)
add_compile_options
(
-fno-exceptions
)
endif
()
endif
()
# Error if there's symbols that are not found at link time.
if
(
NOT CMAKE_VERSION VERSION_LESS
"3.13"
)
add_link_options
(
"-Wl,-undefined,error"
)
# Error if there's symbols that are not found at link time.
# add_link_options() was added in CMake 3.13 - if using an earlier
# version don't set this - it should be caught by presubmits anyway.
add_link_options
(
"-Wl,-undefined,error"
)
endif
()
elseif
(
MSVC
)
elseif
(
MSVC
)
if
(
NOT ENABLE_RTTI
)
if
(
NOT ENABLE_RTTI
)
string
(
FIND
"
${
CMAKE_CXX_FLAGS
}
"
"/GR"
MSVC_HAS_GR
)
string
(
FIND
"
${
CMAKE_CXX_FLAGS
}
"
"/GR"
MSVC_HAS_GR
)
...
...
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