mirror of
https://gitee.com/openharmony/third_party_nghttp2
synced 2024-11-26 17:40:25 +00:00
cmake: fix jemalloc, libevent include dirs
Caught with cmake --warn-uninitialized.
This commit is contained in:
parent
2b3bc710fc
commit
dad222b8f4
@ -120,7 +120,7 @@ endforeach()
|
||||
include(CMakePushCheckState)
|
||||
include(CheckCXXSourceCompiles)
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} ${CXX1XCXXFLAGS}")
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${CXX1XCXXFLAGS}")
|
||||
# Check that std::future is available.
|
||||
check_cxx_source_compiles("
|
||||
#include <vector>
|
||||
@ -429,7 +429,6 @@ add_subdirectory(contrib)
|
||||
add_subdirectory(script)
|
||||
|
||||
|
||||
# XXX fix shared/static library
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" _build_type)
|
||||
message(STATUS "summary of build options:
|
||||
|
||||
@ -445,9 +444,6 @@ message(STATUS "summary of build options:
|
||||
CXXFLAGS: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${_build_type}}
|
||||
WARNCFLAGS: ${WARNCFLAGS}
|
||||
CXX1XCXXFLAGS: ${CXX1XCXXFLAGS}
|
||||
Library:
|
||||
Shared: ${enable_shared}
|
||||
Static: ${enable_static}
|
||||
Python:
|
||||
Python: ${PYTHON_EXECUTABLE}
|
||||
PYTHON_VERSION: ${PYTHON_VERSION_STRING}
|
||||
|
@ -1,10 +1,11 @@
|
||||
# Convenience function that checks the availability
|
||||
# of certain C or C++ compiler flags and appends valid ones.
|
||||
# Convenience function that checks the availability of certain
|
||||
# C or C++ compiler flags and returns valid ones as a string.
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
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})
|
||||
set(flag_var "C_FLAG_${flag_var}")
|
||||
@ -17,6 +18,7 @@ function(extract_valid_c_flags varname)
|
||||
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})
|
||||
set(flag_var "CXX_FLAG_${flag_var}")
|
||||
|
@ -9,7 +9,7 @@ pkg_check_modules(PC_JEMALLOC QUIET jemalloc)
|
||||
|
||||
find_path(JEMALLOC_INCLUDE_DIR
|
||||
NAMES jemalloc/jemalloc.h
|
||||
HINTS ${PC_PCJEMALLOC_INCLUDE_DIRS}
|
||||
HINTS ${PC_JEMALLOC_INCLUDE_DIRS}
|
||||
)
|
||||
find_library(JEMALLOC_LIBRARY
|
||||
NAMES jemalloc
|
||||
|
@ -13,7 +13,7 @@ if(ENABLE_EXAMPLES)
|
||||
${CMAKE_SOURCE_DIR}/src/includes
|
||||
${CMAKE_SOURCE_DIR}/third-party
|
||||
|
||||
${LIBEVENT_OPENSSL_INCLUDE_DIRS}
|
||||
${LIBEVENT_INCLUDE_DIRS}
|
||||
${OPENSSL_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user