Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cmake/Autoconfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ function(check_support var source includes libraries definitions)
list(APPEND CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(CMAKE_REQUIRED_LIBRARIES "${libraries}")
set(CMAKE_REQUIRED_DEFINITIONS "${definitions}")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT CPPTRACE_INHERIT_HOST_PROPERTIES)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
string(CONCAT full_source "#include \"${source}\"" ${nonce})
check_cxx_source_compiles(${full_source} ${var})
set(${var} ${${var}} PARENT_SCOPE)
Expand Down
6 changes: 6 additions & 0 deletions cmake/OptionVariables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ set(
# depends on CMAKE_INSTALL_LIBDIR which is marked as advanced in GNUInstallDirs
mark_as_advanced(CPPTRACE_INSTALL_CMAKEDIR)

# ---- Autodetect Options ----

# If enabled the calls to check_support will not enforce C++11 and use
# whatever the host project has set
option(CPPTRACE_INHERIT_HOST_PROPERTIES "Inherit host properties" Off)

# ---- Symbol Options ----

option(CPPTRACE_GET_SYMBOLS_WITH_LIBBACKTRACE "" OFF)
Expand Down
Loading