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(CMakePushCheckState)
|
||||||
include(CheckCXXSourceCompiles)
|
include(CheckCXXSourceCompiles)
|
||||||
cmake_push_check_state()
|
cmake_push_check_state()
|
||||||
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} ${CXX1XCXXFLAGS}")
|
set(CMAKE_REQUIRED_DEFINITIONS "${CXX1XCXXFLAGS}")
|
||||||
# Check that std::future is available.
|
# Check that std::future is available.
|
||||||
check_cxx_source_compiles("
|
check_cxx_source_compiles("
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -429,7 +429,6 @@ add_subdirectory(contrib)
|
||||||
add_subdirectory(script)
|
add_subdirectory(script)
|
||||||
|
|
||||||
|
|
||||||
# XXX fix shared/static library
|
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" _build_type)
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" _build_type)
|
||||||
message(STATUS "summary of build options:
|
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}}
|
CXXFLAGS: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${_build_type}}
|
||||||
WARNCFLAGS: ${WARNCFLAGS}
|
WARNCFLAGS: ${WARNCFLAGS}
|
||||||
CXX1XCXXFLAGS: ${CXX1XCXXFLAGS}
|
CXX1XCXXFLAGS: ${CXX1XCXXFLAGS}
|
||||||
Library:
|
|
||||||
Shared: ${enable_shared}
|
|
||||||
Static: ${enable_static}
|
|
||||||
Python:
|
Python:
|
||||||
Python: ${PYTHON_EXECUTABLE}
|
Python: ${PYTHON_EXECUTABLE}
|
||||||
PYTHON_VERSION: ${PYTHON_VERSION_STRING}
|
PYTHON_VERSION: ${PYTHON_VERSION_STRING}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
# Convenience function that checks the availability
|
# Convenience function that checks the availability of certain
|
||||||
# of certain C or C++ compiler flags and appends valid ones.
|
# C or C++ compiler flags and returns valid ones as a string.
|
||||||
|
|
||||||
include(CheckCCompilerFlag)
|
include(CheckCCompilerFlag)
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
function(extract_valid_c_flags varname)
|
function(extract_valid_c_flags varname)
|
||||||
|
set(valid_flags)
|
||||||
foreach(flag IN LISTS ARGN)
|
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}")
|
set(flag_var "C_FLAG_${flag_var}")
|
||||||
|
@ -17,6 +18,7 @@ function(extract_valid_c_flags varname)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(extract_valid_cxx_flags varname)
|
function(extract_valid_cxx_flags varname)
|
||||||
|
set(valid_flags)
|
||||||
foreach(flag IN LISTS ARGN)
|
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}")
|
set(flag_var "CXX_FLAG_${flag_var}")
|
||||||
|
|
|
@ -9,7 +9,7 @@ pkg_check_modules(PC_JEMALLOC QUIET jemalloc)
|
||||||
|
|
||||||
find_path(JEMALLOC_INCLUDE_DIR
|
find_path(JEMALLOC_INCLUDE_DIR
|
||||||
NAMES jemalloc/jemalloc.h
|
NAMES jemalloc/jemalloc.h
|
||||||
HINTS ${PC_PCJEMALLOC_INCLUDE_DIRS}
|
HINTS ${PC_JEMALLOC_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
find_library(JEMALLOC_LIBRARY
|
find_library(JEMALLOC_LIBRARY
|
||||||
NAMES jemalloc
|
NAMES jemalloc
|
||||||
|
|
|
@ -13,7 +13,7 @@ if(ENABLE_EXAMPLES)
|
||||||
${CMAKE_SOURCE_DIR}/src/includes
|
${CMAKE_SOURCE_DIR}/src/includes
|
||||||
${CMAKE_SOURCE_DIR}/third-party
|
${CMAKE_SOURCE_DIR}/third-party
|
||||||
|
|
||||||
${LIBEVENT_OPENSSL_INCLUDE_DIRS}
|
${LIBEVENT_INCLUDE_DIRS}
|
||||||
${OPENSSL_INCLUDE_DIRS}
|
${OPENSSL_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue