cmake: use of BUILD_EXAMPLES

This commit is contained in:
Mizux Seiha
2020-07-26 00:06:59 +02:00
parent ed2892b317
commit 3b7d00802e
4 changed files with 8 additions and 3 deletions

View File

@@ -306,7 +306,8 @@ foreach(SUBPROJECT IN ITEMS
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}::${SUBPROJECT})
endforeach()
if(BUILD_TESTING)
# Examples
if(BUILD_EXAMPLES)
add_subdirectory(examples/cpp)
endif()

View File

@@ -200,7 +200,6 @@ add_custom_target(dotnet_package ALL
WORKING_DIRECTORY dotnet
)
# Test
if(BUILD_TESTING)
if(BUILD_EXAMPLES)
#add_subdirectory(examples/dotnet)
endif()

View File

@@ -212,5 +212,8 @@ if(BUILD_TESTING)
NAME JavaTest
COMMAND ${MAVEN_EXECUTABLE} exec:java -Dexec.mainClass=com.google.ortools.Test
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/java/${JAVA_TEST_PROJECT})
endif()
if(BUILD_EXAMPLES)
#add_subdirectory(examples/java)
endif()

View File

@@ -183,7 +183,9 @@ if(BUILD_TESTING)
# run the tests within the virtualenv
add_test(NAME pytest_venv
COMMAND ${VENV_Python_EXECUTABLE} ${VENV_DIR}/test.py)
endif()
if(BUILD_EXAMPLES)
#add_subdirectory(examples/python)
#add_subdirectory(examples/notebook)
endif()