File tree Expand file tree Collapse file tree 4 files changed +23
-5
lines changed
metacall_python_callback_test
metacall_reinitialize_test
metacall_return_monad_test Expand file tree Collapse file tree 4 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 3333# https://gitlab.kitware.com/cmake/cmake/-/issues/19467
3434
3535macro (cmake_expand_generator_expressions output )
36+ # Convert the list of parameters into a list of arguments
3637 set (CMAKE_GENERATOR_EXPRESSION_LIST "${ARGN} " )
3738 set (GENERATOR_EXPRESSION_TEMP_PATH "${CMAKE_CURRENT_BINARY_DIR} /cmake_expand_generator_expressions" )
3839 string (REGEX REPLACE ";" " " CMAKE_GENERATOR_EXPRESSION_LIST "${CMAKE_GENERATOR_EXPRESSION_LIST} " )
3940 string (REGEX REPLACE "\n " " " CMAKE_GENERATOR_EXPRESSION_LIST "${CMAKE_GENERATOR_EXPRESSION_LIST} " )
41+
42+ # Generate a CMake script for executing it (needs the build phase to evaluate the generator expressions)
4043 set (contents
4144 "file(GENERATE"
4245 " OUTPUT \" ${GENERATOR_EXPRESSION_TEMP_PATH} /output.tmp\" "
@@ -55,8 +58,13 @@ macro(cmake_expand_generator_expressions output)
5558 "${GENERATOR_EXPRESSION_TEMP_PATH} /output.tmp"
5659 GENERATED_OUTPUT
5760 )
61+
5862 # This is to avoid possible side effects, but I decided to remove it for caching purposes
5963 # file(REMOVE_RECURSE "${GENERATOR_EXPRESSION_TEMP_PATH}")
64+
65+ # Clean the output and generate a list
66+ string (STRIP "${GENERATED_OUTPUT} " GENERATED_OUTPUT)
67+ string (REGEX REPLACE "\n " "" GENERATED_OUTPUT "${GENERATED_OUTPUT} " )
6068 string (REGEX REPLACE " " ";" GENERATED_OUTPUT "${GENERATED_OUTPUT} " )
6169 set (${output} "${GENERATED_OUTPUT} " )
6270endmacro ()
Original file line number Diff line number Diff line change 1- #
2- # Executable name and options
3- #
4-
51# Check if loaders, scripts and ports are enabled
62if (NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_PY OR NOT OPTION_BUILD_LOADERS_NODE
73 OR NOT OPTION_BUILD_SCRIPTS OR NOT OPTION_BUILD_SCRIPTS_PY
84 OR NOT OPTION_BUILD_PORTS OR NOT OPTION_BUILD_PORTS_PY)
95 return ()
106endif ()
117
8+ #
9+ # Executable name and options
10+ #
11+
1212# Target name
1313set (target metacall-python-callback-test )
1414message (STATUS "Test ${target} " )
Original file line number Diff line number Diff line change 1+ # Check if loaders, scripts and ports are enabled
2+ if (NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_MOCK)
3+ return ()
4+ endif ()
5+
16#
27# Executable name and options
38#
@@ -123,7 +128,7 @@ add_test(NAME ${target}
123128#
124129
125130add_dependencies (${target}
126- py_loader
131+ mock_loader
127132)
128133
129134#
Original file line number Diff line number Diff line change 1+ # Check if loaders, scripts and ports are enabled
2+ if (NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_PY)
3+ return ()
4+ endif ()
5+
16#
27# Executable name and options
38#
You can’t perform that action at this time.
0 commit comments