mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-04 13:41:36 +00:00
feat: drop CMake 3.6 and below, modernize CMake
fix: include PYTHON_IS_DEBUG
This commit is contained in:
committed by
Henry Schreiner
parent
1491c94c9d
commit
6ec1775fff
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user