Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Use python2 (if available) to run cxxtestgen #523

Merged
merged 1 commit into from
Feb 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cpp_test_suite/cxxtest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
find_package (Threads REQUIRED)
find_program(PYTHON_INTERPRETER NAMES python2 python)

macro(CXX_GENERATE_TEST name)
message("Generate ${name}.cpp")
execute_process(COMMAND python cxxtestgen.py --template=${CMAKE_CURRENT_SOURCE_DIR}/template/tango_template.tpl
execute_process(COMMAND "${PYTHON_INTERPRETER}" cxxtestgen.py
--template=${CMAKE_CURRENT_SOURCE_DIR}/template/tango_template.tpl
-o ${CMAKE_CURRENT_SOURCE_DIR}/${name}.cpp
../../new_tests/${name}.cpp
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
Expand Down