Roger Meier | 74d503e | 2015-06-05 07:10:19 +0200 | [diff] [blame] | 1 | # |
| 2 | # Licensed to the Apache Software Foundation (ASF) under one |
| 3 | # or more contributor license agreements. See the NOTICE file |
| 4 | # distributed with this work for additional information |
| 5 | # regarding copyright ownership. The ASF licenses this file |
| 6 | # to you under the Apache License, Version 2.0 (the |
| 7 | # "License"); you may not use this file except in compliance |
| 8 | # with the License. You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, |
| 13 | # software distributed under the License is distributed on an |
| 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | # KIND, either express or implied. See the License for the |
| 16 | # specific language governing permissions and limitations |
| 17 | # under the License. |
| 18 | # |
| 19 | |
Roger Meier | a03464c | 2015-09-30 08:15:53 +0200 | [diff] [blame] | 20 | add_test(NAME python_test_generate |
| 21 | COMMAND ${CMAKE_COMMAND} |
| 22 | -DTHRIFTCOMPILER=$<TARGET_FILE:thrift-compiler> |
| 23 | -DMY_PROJECT_DIR=${PROJECT_SOURCE_DIR} |
| 24 | -DMY_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} |
Nobuaki Sukegawa | a3b88a0 | 2016-01-06 20:44:17 +0900 | [diff] [blame^] | 25 | -DMY_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} |
Roger Meier | a03464c | 2015-09-30 08:15:53 +0200 | [diff] [blame] | 26 | -P ${CMAKE_CURRENT_SOURCE_DIR}/generate.cmake |
| 27 | ) |
| 28 | |
Roger Meier | 74d503e | 2015-06-05 07:10:19 +0200 | [diff] [blame] | 29 | add_test(NAME python_test |
Nobuaki Sukegawa | a3b88a0 | 2016-01-06 20:44:17 +0900 | [diff] [blame^] | 30 | COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/RunClientServer.py --gen-base=${CMAKE_CURRENT_BINARY_DIR} |
Roger Meier | a03464c | 2015-09-30 08:15:53 +0200 | [diff] [blame] | 31 | DEPENDS python_test_generate |
Roger Meier | 74d503e | 2015-06-05 07:10:19 +0200 | [diff] [blame] | 32 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
| 33 | ) |
| 34 | |