Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
glog
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
glog
Commits
e6c26b2b
Commit
e6c26b2b
authored
8 years ago
by
Sergiu Deitsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: fixed clang warning propagation to gcc
parent
a6675187
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
CMakeLists.txt
CMakeLists.txt
+10
-6
No files found.
CMakeLists.txt
View file @
e6c26b2b
...
...
@@ -101,8 +101,14 @@ check_function_exists (pwrite HAVE_PWRITE)
check_function_exists
(
sigaction HAVE_SIGACTION
)
check_function_exists
(
sigaltstack HAVE_SIGALSTACK
)
check_cxx_compiler_flag
(
-Wno-deprecated HAVE_NO_DEPRECATED
)
check_cxx_compiler_flag
(
-Wno-unnamed-type-template-args
# NOTE gcc does not fail if you pass a non-existent -Wno-* option as an
# argument. However, it will happily fail if you pass the corresponding -W*
# option. So, we check whether options that disable warnings exist by testing
# the availability of the corresponding option that enables the warning. This
# eliminates the need to check for compiler for several (mainly Clang) options.
check_cxx_compiler_flag
(
-Wdeprecated HAVE_NO_DEPRECATED
)
check_cxx_compiler_flag
(
-Wunnamed-type-template-args
HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS
)
# NOTE: Cannot use check_function_exists here since >=vc-14.0 can define
...
...
@@ -368,6 +374,8 @@ if (WIN32)
)
endif (WIN32)
add_compile_options ($<$<BOOL:
${
HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS
}
>:-Wno-unnamed-type-template-args>)
add_library (glog
${
GLOG_SRCS
}
)
...
...
@@ -381,10 +389,6 @@ if (WIN32 AND HAVE_SNPRINTF)
HAVE_SNPRINTF)
endif (WIN32 AND HAVE_SNPRINTF)
if (HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS)
target_compile_options (glog PUBLIC -Wno-unnamed-type-template-args)
endif (HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS)
if (gflags_FOUND)
target_include_directories (glog PUBLIC
${
gflags_INCLUDE_DIR
}
)
target_link_libraries (glog PUBLIC
${
gflags_LIBRARIES
}
)
...
...
This diff is collapsed.
Click to expand it.
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