-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed #13343 - Bump
cmake_minimum_required()
to 3.13 (#7213)
and do associated cleanups. Fixes #13343 Recent CMake versions emit: ``` CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. ```
- Loading branch information
Showing
5 changed files
with
26 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
if (CMAKE_VERSION VERSION_EQUAL "3.13" OR CMAKE_VERSION VERSION_GREATER "3.13") | ||
# target_link_options requires CMake 3.13 | ||
add_executable(test-signalhandler | ||
test-signalhandler.cpp | ||
${PROJECT_SOURCE_DIR}/cli/signalhandler.cpp | ||
${PROJECT_SOURCE_DIR}/cli/stacktrace.cpp) | ||
target_include_directories(test-signalhandler PRIVATE ${PROJECT_SOURCE_DIR}/cli ${PROJECT_SOURCE_DIR}/lib) | ||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
# names for static functions are omitted from trace | ||
target_compile_options_safe(test-signalhandler -Wno-missing-declarations) | ||
target_compile_options_safe(test-signalhandler -Wno-missing-prototypes) | ||
# required for backtrace() to produce function names | ||
target_link_options(test-signalhandler PRIVATE -rdynamic) | ||
endif() | ||
|
||
add_executable(test-signalhandler | ||
test-signalhandler.cpp | ||
${PROJECT_SOURCE_DIR}/cli/signalhandler.cpp | ||
${PROJECT_SOURCE_DIR}/cli/stacktrace.cpp) | ||
target_include_directories(test-signalhandler PRIVATE ${PROJECT_SOURCE_DIR}/cli ${PROJECT_SOURCE_DIR}/lib) | ||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
# names for static functions are omitted from trace | ||
target_compile_options_safe(test-signalhandler -Wno-missing-declarations) | ||
target_compile_options_safe(test-signalhandler -Wno-missing-prototypes) | ||
# required for backtrace() to produce function names | ||
target_link_options(test-signalhandler PRIVATE -rdynamic) | ||
endif() | ||
|
||
add_executable(test-stacktrace | ||
test-stacktrace.cpp | ||
${PROJECT_SOURCE_DIR}/cli/stacktrace.cpp) | ||
target_include_directories(test-stacktrace PRIVATE ${PROJECT_SOURCE_DIR}/cli ${PROJECT_SOURCE_DIR}/lib) | ||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
# names for static functions are omitted from trace | ||
target_compile_options_safe(test-stacktrace -Wno-missing-declarations) | ||
target_compile_options_safe(test-stacktrace -Wno-missing-prototypes) | ||
# required for backtrace() to produce function names | ||
target_link_options(test-stacktrace PRIVATE -rdynamic) | ||
endif() | ||
endif() | ||
add_executable(test-stacktrace | ||
test-stacktrace.cpp | ||
${PROJECT_SOURCE_DIR}/cli/stacktrace.cpp) | ||
target_include_directories(test-stacktrace PRIVATE ${PROJECT_SOURCE_DIR}/cli ${PROJECT_SOURCE_DIR}/lib) | ||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
# names for static functions are omitted from trace | ||
target_compile_options_safe(test-stacktrace -Wno-missing-declarations) | ||
target_compile_options_safe(test-stacktrace -Wno-missing-prototypes) | ||
# required for backtrace() to produce function names | ||
target_link_options(test-stacktrace PRIVATE -rdynamic) | ||
endif() |