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

Commit

Permalink
Use python2 (if available) to run cxxtestgen
Browse files Browse the repository at this point in the history
  • Loading branch information
mliszcz committed Jan 29, 2019
1 parent 07eea09 commit bdc8e2f
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit bdc8e2f

Please sign in to comment.