mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-05 22:23:21 +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_target CXX)
|
||||
|
||||
set(CMAKE_MODULE_PATH "")
|
||||
@@ -20,11 +20,3 @@ set_target_properties(test_cmake_build PROPERTIES NO_SYSTEM_FROM_IMPORTED ON)
|
||||
|
||||
add_custom_target(check ${CMAKE_COMMAND} -E env PYTHONPATH=$<TARGET_FILE_DIR:test_cmake_build>
|
||||
${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/../test.py ${PROJECT_NAME})
|
||||
|
||||
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