Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
90d66ea4
Commit
90d66ea4
authored
9 years ago
by
Peter Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: fix detection of -Werror flag
Do not use minus sign in macro names.
parent
5b21c39b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
CMakeLists.txt
CMakeLists.txt
+4
-6
cmake/ExtractValidFlags.cmake
cmake/ExtractValidFlags.cmake
+2
-2
No files found.
CMakeLists.txt
View file @
90d66ea4
...
...
@@ -106,11 +106,10 @@ else()
add_definitions
(
-D_U_ -DNGHTTP2_NORETURN
)
endif
()
include
(
CheckCXXCompilerFlag
)
foreach
(
_std gnu++11 gnu++0x
)
set
(
_cxx1x_flag -std=
${
_std
}
)
check_cxx_compiler_flag
(
${
_cxx1x_flag
}
CXX_FLAG_-std_
${
_std
}
)
if
(
CXX_FLAG_-std_
${
_std
}
)
include
(
ExtractValidFlags
)
foreach
(
_cxx1x_flag -std=gnu++11 -std=gnu++0x
)
extract_valid_cxx_flags
(
_cxx1x_flag_supported
${
_cxx1x_flag
}
)
if
(
_cxx1x_flag_supported
)
set
(
CXX1XCXXFLAGS
${
_cxx1x_flag
}
)
break
()
endif
()
...
...
@@ -381,7 +380,6 @@ if(HAVE_EPOLL AND HAVE_TIMERFD_CREATE)
set
(
ENABLE_TINY_NGHTTPD 1
)
endif
()
include
(
ExtractValidFlags
)
if
(
ENABLE_WERROR
)
# For C compiler
extract_valid_c_flags
(
WARNCFLAGS
...
...
This diff is collapsed.
Click to expand it.
cmake/ExtractValidFlags.cmake
View file @
90d66ea4
...
...
@@ -7,7 +7,7 @@ include(CheckCXXCompilerFlag)
function
(
extract_valid_c_flags varname
)
set
(
valid_flags
""
)
foreach
(
flag IN LISTS ARGN
)
string
(
REGEX REPLACE
"[^a-zA-Z0-9_
-
]+"
"_"
flag_var
${
flag
}
)
string
(
REGEX REPLACE
"[^a-zA-Z0-9_]+"
"_"
flag_var
${
flag
}
)
set
(
flag_var
"C_FLAG_
${
flag_var
}
"
)
check_c_compiler_flag
(
"
${
flag
}
"
"
${
flag_var
}
"
)
if
(
${
flag_var
}
)
...
...
@@ -20,7 +20,7 @@ endfunction()
function
(
extract_valid_cxx_flags varname
)
set
(
valid_flags
""
)
foreach
(
flag IN LISTS ARGN
)
string
(
REGEX REPLACE
"[^a-zA-Z0-9_
-
]+"
"_"
flag_var
${
flag
}
)
string
(
REGEX REPLACE
"[^a-zA-Z0-9_]+"
"_"
flag_var
${
flag
}
)
set
(
flag_var
"CXX_FLAG_
${
flag_var
}
"
)
check_cxx_compiler_flag
(
"
${
flag
}
"
"
${
flag_var
}
"
)
if
(
${
flag_var
}
)
...
...
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