feat: drop CMake 3.6 and below, modernize CMake

fix: include PYTHON_IS_DEBUG
This commit is contained in:
Henry Schreiner
2020-07-28 00:43:12 -04:00
committed by Henry Schreiner
parent 1491c94c9d
commit 6ec1775fff
16 changed files with 334 additions and 364 deletions

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.7)
project(test_installed_embed CXX)
set(CMAKE_MODULE_PATH "")
@@ -14,11 +14,3 @@ target_link_libraries(test_cmake_build PRIVATE pybind11::embed)
set_target_properties(test_cmake_build PROPERTIES NO_SYSTEM_FROM_IMPORTED ON)
add_custom_target(check $<TARGET_FILE:test_cmake_build> ${PROJECT_SOURCE_DIR}/../test.py)
if(CMAKE_CXX_STANDARD AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND PYTHON_VERSION VERSION_LESS 3.0)
if(CMAKE_CXX_STANDARD LESS 17)
target_compile_options(test_cmake_build PUBLIC -Wno-deprecated-register)
else()
target_compile_options(test_cmake_build PUBLIC -Wno-register)
endif()
endif()