diff --git a/CMakeLists.txt b/CMakeLists.txt index f8f75305f2c..c446c608952 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,10 @@ cmake_minimum_required(VERSION 2.8.7) +if(POLICY CMP0046) + cmake_policy(SET CMP0046 NEW) +endif() +if(POLICY CMP0054) + cmake_policy(SET CMP0054 NEW) +endif() # ---[ Caffe project project(Caffe C CXX) @@ -67,8 +73,10 @@ add_subdirectory(docs) add_custom_target(lint COMMAND ${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/cmake/lint.cmake) # ---[ pytest target -add_custom_target(pytest COMMAND python${python_version} -m unittest discover -s caffe/test WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/python ) -add_dependencies(pytest pycaffe) +if(BUILD_python) + add_custom_target(pytest COMMAND python${python_version} -m unittest discover -s caffe/test WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/python ) + add_dependencies(pytest pycaffe) +endif() # ---[ Configuration summary caffe_print_configuration_summary()