mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 02:39:48 -06:00
Tests: Add cases for Ninja Multi-Config cross-config custom commands
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating depend_echo_genex_Debug\.txt
|
||||
depend_echo_genex_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating depend_echo_genex_Debug\.txt
|
||||
depend_echo_genex_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Release[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Release[\/]echo(\.exe)?
|
||||
\[3/3\] Generating depend_echo_genex_cmd_Debug\.txt
|
||||
depend_echo_genex_cmd_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating depend_echo_genex_cmd_Debug\.txt
|
||||
depend_echo_genex_cmd_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating depend_echo_genex_out_Debug\.txt
|
||||
depend_echo_genex_out_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating depend_echo_genex_out_Debug\.txt
|
||||
depend_echo_genex_out_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Release[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Release[\/]echo(\.exe)?
|
||||
\[3/3\] Generating depend_echo_raw_Debug\.txt
|
||||
depend_echo_raw_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating depend_echo_raw_Debug\.txt
|
||||
depend_echo_raw_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Debug\.txt
|
||||
depend_Debug\.txt
|
||||
\[2/2\] Generating echo_depend_Debug\.txt
|
||||
echo_depend_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Debug\.txt
|
||||
depend_Debug\.txt
|
||||
\[2/2\] Generating echo_depend_Debug\.txt
|
||||
echo_depend_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Release\.txt
|
||||
depend_Release\.txt
|
||||
\[2/2\] Generating echo_depend_cmd_Debug\.txt
|
||||
echo_depend_cmd_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Debug\.txt
|
||||
depend_Debug\.txt
|
||||
\[2/2\] Generating echo_depend_cmd_Debug\.txt
|
||||
echo_depend_cmd_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Debug\.txt
|
||||
depend_Debug\.txt
|
||||
\[2/2\] Generating echo_depend_out_Debug\.txt
|
||||
echo_depend_out_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Debug\.txt
|
||||
depend_Debug\.txt
|
||||
\[2/2\] Generating echo_depend_out_Debug\.txt
|
||||
echo_depend_out_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Release[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Release[\/]echo(\.exe)?
|
||||
\[3/3\] Generating echo_genex_Debug\.txt
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Release[\/]echo(\.exe)?' 'Release' 'echo_genex_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating echo_genex_Debug\.txt
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_genex_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating echo_genex_out_Debug\.txt
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Release'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_genex_out_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating echo_genex_out_Debug\.txt
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_genex_out_Debug\.txt'$
|
||||
@@ -0,0 +1 @@
|
||||
[^0]
|
||||
@@ -0,0 +1 @@
|
||||
ninja: error: 'echo_no_cross_byproduct_Debug\.txt', needed by 'CMakeFiles/echo_no_cross_byproduct-Debug', missing and no known rule to make it
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating echo_no_cross_byproduct_Debug\.txt
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_no_cross_byproduct_Debug\.txt'$
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
ninja: error: 'echo_no_cross_byproduct_if_Debug\.txt', needed by 'CMakeFiles/echo_no_cross_byproduct_if-Debug', missing and no known rule to make it
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating echo_no_cross_byproduct_if_Debug\.txt
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_no_cross_byproduct_if_Debug\.txt'$
|
||||
@@ -0,0 +1 @@
|
||||
[^0]
|
||||
@@ -0,0 +1 @@
|
||||
ninja: error: 'echo_no_cross_output_Debug\.txt', needed by 'CMakeFiles/echo_no_cross_output-Debug', missing and no known rule to make it
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating echo_no_cross_output\.txt, echo_no_cross_output_Debug\.txt
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_no_cross_output_Debug\.txt'$
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
ninja: error: 'echo_no_cross_output_if_Debug\.txt', needed by 'CMakeFiles/echo_no_cross_output_if-Debug', missing and no known rule to make it
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating echo_no_cross_output_a\.txt, echo_no_cross_output_if_Debug\.txt
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_no_cross_output_if_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Release[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Release[\/]echo(\.exe)?
|
||||
\[3/3\] Generating echo_raw_Debug\.txt
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Release[\/]echo(\.exe)?' 'Debug' 'echo_raw_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] Generating echo_raw_Debug\.txt
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_raw_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Debug\.txt
|
||||
depend_Debug\.txt
|
||||
\[2/2\] echo_target_depend
|
||||
echo_target_depend_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Debug\.txt
|
||||
depend_Debug\.txt
|
||||
\[2/2\] echo_target_depend
|
||||
echo_target_depend_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Release\.txt
|
||||
depend_Release\.txt
|
||||
\[2/2\] echo_target_depend_cmd
|
||||
echo_target_depend_cmd_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Debug\.txt
|
||||
depend_Debug\.txt
|
||||
\[2/2\] echo_target_depend_cmd
|
||||
echo_target_depend_cmd_Debug\.txt$
|
||||
@@ -0,0 +1,5 @@
|
||||
^(Recompacting log\.\.\.
|
||||
)?\[1/2\] Generating depend_Debug\.txt
|
||||
depend_Debug\.txt
|
||||
\[2/2\] echo_target_depend_out
|
||||
echo_target_depend_out_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/2\] Generating depend_Debug\.txt
|
||||
depend_Debug\.txt
|
||||
\[2/2\] echo_target_depend_out
|
||||
echo_target_depend_out_Debug\.txt$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Release[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Release[\/]echo(\.exe)?
|
||||
\[3/3\] echo_target_genex
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Release[\/]echo(\.exe)?' 'Release' 'echo_target_genex_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] echo_target_genex
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_target_genex_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] echo_target_genex_out
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Release'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_target_genex_out_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] echo_target_genex_out
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_target_genex_out_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Release[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Release[\/]echo(\.exe)?
|
||||
\[3/3\] echo_target_raw
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Release[\/]echo(\.exe)?' 'Debug' 'echo_target_raw_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] echo_target_raw
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'echo_target_raw_Debug\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Release[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Release[\/]echo(\.exe)?
|
||||
\[3/3\] target_no_cross_byproduct
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Release'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Release[\/]echo(\.exe)?' 'Release' 'target_no_cross_byproduct\.txt'$
|
||||
@@ -0,0 +1,4 @@
|
||||
^\[1/3\] Building C object CMakeFiles[\/]echo.dir[\/]Debug[\/]echo\.c\.(o|obj)
|
||||
\[2/3\] Linking C executable Debug[\/]echo(\.exe)?
|
||||
\[3/3\] target_no_cross_byproduct
|
||||
'[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug'\$ '[^']*[\/]Tests[\/]RunCMake[\/]NinjaMultiConfig[\/]CustomCommandOutputGenex-build[\/]Debug[\/]echo(\.exe)?' 'Debug' 'target_no_cross_byproduct\.txt'$
|
||||
167
Tests/RunCMake/NinjaMultiConfig/CustomCommandOutputGenex.cmake
Normal file
167
Tests/RunCMake/NinjaMultiConfig/CustomCommandOutputGenex.cmake
Normal file
@@ -0,0 +1,167 @@
|
||||
enable_language(C)
|
||||
|
||||
add_executable(echo echo.c)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT echo_raw_$<CONFIG>.txt
|
||||
COMMAND echo $<CONFIG> echo_raw_$<CONFIG>.txt
|
||||
WORKING_DIRECTORY $<CONFIG>
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT echo_genex_$<IF:$<CONFIG:Debug>,Debug,$<IF:$<CONFIG:Release>,Release,$<IF:$<CONFIG:MinSizeRel>,MinSizeRel,RelWithDebInfo>>>.txt
|
||||
COMMAND $<TARGET_FILE:echo> $<COMMAND_CONFIG:$<CONFIG>> echo_genex_$<OUTPUT_CONFIG:$<CONFIG>>.txt
|
||||
WORKING_DIRECTORY $<OUTPUT_CONFIG:$<CONFIG>>
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT echo_genex_out_$<CONFIG>.txt
|
||||
COMMAND $<OUTPUT_CONFIG:$<TARGET_FILE:echo>> $<CONFIG> echo_genex_out_$<CONFIG>.txt
|
||||
WORKING_DIRECTORY $<COMMAND_CONFIG:$<CONFIG>>
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT depend_$<CONFIG>.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E echo depend_$<CONFIG>.txt
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT echo_depend_$<CONFIG>.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E echo echo_depend_$<CONFIG>.txt
|
||||
DEPENDS depend_$<CONFIG>.txt
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT echo_depend_out_$<CONFIG>.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E echo echo_depend_out_$<CONFIG>.txt
|
||||
DEPENDS $<OUTPUT_CONFIG:depend_$<CONFIG>.txt>
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT echo_depend_cmd_$<CONFIG>.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E echo echo_depend_cmd_$<CONFIG>.txt
|
||||
DEPENDS $<COMMAND_CONFIG:depend_$<CONFIG>.txt>
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT depend_echo_raw_$<CONFIG>.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E echo depend_echo_raw_$<CONFIG>.txt
|
||||
DEPENDS echo
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT depend_echo_genex_$<CONFIG>.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E echo depend_echo_genex_$<CONFIG>.txt
|
||||
DEPENDS $<TARGET_FILE:echo>
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT depend_echo_genex_out_$<CONFIG>.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E echo depend_echo_genex_out_$<CONFIG>.txt
|
||||
DEPENDS $<OUTPUT_CONFIG:$<TARGET_FILE:echo>>
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT depend_echo_genex_cmd_$<CONFIG>.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E echo depend_echo_genex_cmd_$<CONFIG>.txt
|
||||
DEPENDS $<COMMAND_CONFIG:$<TARGET_FILE:echo>>
|
||||
)
|
||||
|
||||
# An OUTPUT that is not per-config prevents cross-config generation.
|
||||
add_custom_command(
|
||||
OUTPUT echo_no_cross_output.txt echo_no_cross_output_$<CONFIG>.txt
|
||||
COMMAND echo $<CONFIG> echo_no_cross_output_$<CONFIG>.txt
|
||||
WORKING_DIRECTORY $<CONFIG>
|
||||
)
|
||||
add_custom_command(
|
||||
OUTPUT echo_no_cross_output_$<IF:$<CONFIG:Debug>,a,b>.txt echo_no_cross_output_if_$<CONFIG>.txt
|
||||
COMMAND echo $<CONFIG> echo_no_cross_output_if_$<CONFIG>.txt
|
||||
WORKING_DIRECTORY $<CONFIG>
|
||||
)
|
||||
|
||||
# BYPRODUCTS that are not per-config prevent cross-config generation.
|
||||
add_custom_command(
|
||||
OUTPUT echo_no_cross_byproduct_$<CONFIG>.txt
|
||||
BYPRODUCTS echo_no_cross_byproduct.txt
|
||||
COMMAND echo $<CONFIG> echo_no_cross_byproduct_$<CONFIG>.txt
|
||||
WORKING_DIRECTORY $<CONFIG>
|
||||
)
|
||||
add_custom_command(
|
||||
OUTPUT echo_no_cross_byproduct_if_$<CONFIG>.txt
|
||||
BYPRODUCTS echo_no_cross_byproduct_$<IF:$<CONFIG:Debug>,a,b>.txt
|
||||
COMMAND echo $<CONFIG> echo_no_cross_byproduct_if_$<CONFIG>.txt
|
||||
WORKING_DIRECTORY $<CONFIG>
|
||||
)
|
||||
|
||||
foreach(case
|
||||
echo_raw
|
||||
echo_genex
|
||||
echo_genex_out
|
||||
echo_depend
|
||||
echo_depend_out
|
||||
echo_depend_cmd
|
||||
depend
|
||||
depend_echo_raw
|
||||
depend_echo_genex
|
||||
depend_echo_genex_out
|
||||
depend_echo_genex_cmd
|
||||
echo_no_cross_output
|
||||
echo_no_cross_output_if
|
||||
echo_no_cross_byproduct
|
||||
echo_no_cross_byproduct_if
|
||||
)
|
||||
set_property(SOURCE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${case}_Debug.txt
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${case}_Release.txt
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${case}_MinSizeRel.txt
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${case}_RelWithDebInfo.txt
|
||||
PROPERTY SYMBOLIC 1)
|
||||
add_custom_target(${case} DEPENDS ${case}_$<CONFIG>.txt)
|
||||
endforeach()
|
||||
|
||||
add_custom_target(echo_target_raw
|
||||
BYPRODUCTS echo_target_raw_$<CONFIG>.txt
|
||||
COMMENT echo_target_raw
|
||||
COMMAND echo $<CONFIG> echo_target_raw_$<CONFIG>.txt
|
||||
WORKING_DIRECTORY $<CONFIG>
|
||||
)
|
||||
|
||||
add_custom_target(echo_target_genex
|
||||
BYPRODUCTS echo_target_genex_$<CONFIG>.txt
|
||||
COMMENT echo_target_genex
|
||||
COMMAND $<TARGET_FILE:echo> $<COMMAND_CONFIG:$<CONFIG>> echo_target_genex_$<OUTPUT_CONFIG:$<CONFIG>>.txt
|
||||
WORKING_DIRECTORY $<OUTPUT_CONFIG:$<CONFIG>>
|
||||
)
|
||||
|
||||
add_custom_target(echo_target_genex_out
|
||||
BYPRODUCTS echo_target_genex_out_$<CONFIG>.txt
|
||||
COMMENT echo_target_genex_out
|
||||
COMMAND $<OUTPUT_CONFIG:$<TARGET_FILE:echo>> $<CONFIG> echo_target_genex_out_$<CONFIG>.txt
|
||||
WORKING_DIRECTORY $<COMMAND_CONFIG:$<CONFIG>>
|
||||
)
|
||||
|
||||
add_custom_target(echo_target_depend
|
||||
COMMAND ${CMAKE_COMMAND} -E echo echo_target_depend_$<CONFIG>.txt
|
||||
DEPENDS depend_$<CONFIG>.txt
|
||||
COMMENT echo_target_depend
|
||||
)
|
||||
|
||||
add_custom_target(echo_target_depend_out
|
||||
COMMAND ${CMAKE_COMMAND} -E echo echo_target_depend_out_$<CONFIG>.txt
|
||||
DEPENDS $<OUTPUT_CONFIG:depend_$<CONFIG>.txt>
|
||||
COMMENT echo_target_depend_out
|
||||
)
|
||||
|
||||
add_custom_target(echo_target_depend_cmd
|
||||
COMMAND ${CMAKE_COMMAND} -E echo echo_target_depend_cmd_$<CONFIG>.txt
|
||||
DEPENDS $<COMMAND_CONFIG:depend_$<CONFIG>.txt>
|
||||
COMMENT echo_target_depend_cmd
|
||||
)
|
||||
|
||||
# BYPRODUCTS that are not per-config block cross-configs.
|
||||
add_custom_target(target_no_cross_byproduct
|
||||
BYPRODUCTS target_no_cross_byproduct.txt
|
||||
COMMENT target_no_cross_byproduct
|
||||
COMMAND echo $<CONFIG> target_no_cross_byproduct.txt
|
||||
WORKING_DIRECTORY $<CONFIG>
|
||||
)
|
||||
@@ -242,6 +242,102 @@ run_ninja(CustomCommandsAndTargets release-leaf-exe build-Release.ninja LeafExe)
|
||||
run_cmake_build(CustomCommandsAndTargets release-clean Release clean:all)
|
||||
run_ninja(CustomCommandsAndTargets release-leaf-byproduct build-Release.ninja main.c)
|
||||
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CustomCommandOutputGenex-build)
|
||||
set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release\\;MinSizeRel\\;RelWithDebInfo;-DCMAKE_CROSS_CONFIGS=all")
|
||||
run_cmake_configure(CustomCommandOutputGenex)
|
||||
set(RunCMake_TEST_NO_CLEAN 1)
|
||||
unset(RunCMake_TEST_OPTIONS)
|
||||
# echo_raw
|
||||
run_ninja(CustomCommandOutputGenex echo_raw-debug build-Debug.ninja echo_raw:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex echo_raw-debug-in-release-graph build-Release.ninja echo_raw:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# echo_genex
|
||||
run_ninja(CustomCommandOutputGenex echo_genex-debug build-Debug.ninja echo_genex:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex echo_genex-debug-in-release-graph build-Release.ninja echo_genex:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# echo_genex_out
|
||||
run_ninja(CustomCommandOutputGenex echo_genex_out-debug build-Debug.ninja echo_genex_out:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex echo_genex_out-debug-in-release-graph build-Release.ninja echo_genex_out:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# echo_depend*
|
||||
run_ninja(CustomCommandOutputGenex echo_depend-debug build-Debug.ninja echo_depend:Debug)
|
||||
run_ninja(CustomCommandOutputGenex echo_depend_out-debug build-Debug.ninja echo_depend_out_Debug.txt)
|
||||
run_ninja(CustomCommandOutputGenex echo_depend_cmd-debug build-Debug.ninja echo_depend_cmd_Debug.txt)
|
||||
run_ninja(CustomCommandOutputGenex echo_depend-debug-in-release-graph build-Release.ninja echo_depend:Debug)
|
||||
run_ninja(CustomCommandOutputGenex echo_depend_out-debug-in-release-graph build-Release.ninja echo_depend_out_Debug.txt)
|
||||
run_ninja(CustomCommandOutputGenex echo_depend_cmd-debug-in-release-graph build-Release.ninja echo_depend_cmd_Debug.txt)
|
||||
# depend_echo_raw
|
||||
run_ninja(CustomCommandOutputGenex depend_echo_raw-debug build-Debug.ninja depend_echo_raw:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex depend_echo_raw-debug-in-release-graph build-Release.ninja depend_echo_raw:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# depend_echo_genex
|
||||
run_ninja(CustomCommandOutputGenex depend_echo_genex-debug build-Debug.ninja depend_echo_genex:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex depend_echo_genex-debug-in-release-graph build-Release.ninja depend_echo_genex:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# depend_echo_genex_out
|
||||
run_ninja(CustomCommandOutputGenex depend_echo_genex_out-debug build-Debug.ninja depend_echo_genex_out:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex depend_echo_genex_out-debug-in-release-graph build-Release.ninja depend_echo_genex_out:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# depend_echo_genex_cmd
|
||||
run_ninja(CustomCommandOutputGenex depend_echo_genex_cmd-debug build-Debug.ninja depend_echo_genex_cmd:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex depend_echo_genex_cmd-debug-in-release-graph build-Release.ninja depend_echo_genex_cmd:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# no_cross_output
|
||||
run_ninja(CustomCommandOutputGenex echo_no_cross_output-debug build-Debug.ninja echo_no_cross_output:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex echo_no_cross_output-debug-in-release-graph build-Release.ninja echo_no_cross_output:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# no_cross_output_if
|
||||
run_ninja(CustomCommandOutputGenex echo_no_cross_output_if-debug build-Debug.ninja echo_no_cross_output_if:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex echo_no_cross_output_if-debug-in-release-graph build-Release.ninja echo_no_cross_output_if:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# no_cross_byproduct
|
||||
run_ninja(CustomCommandOutputGenex echo_no_cross_byproduct-debug build-Debug.ninja echo_no_cross_byproduct:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex echo_no_cross_byproduct-debug-in-release-graph build-Release.ninja echo_no_cross_byproduct:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# no_cross_byproduct_if
|
||||
run_ninja(CustomCommandOutputGenex echo_no_cross_byproduct_if-debug build-Debug.ninja echo_no_cross_byproduct_if:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex echo_no_cross_byproduct_if-debug-in-release-graph build-Release.ninja echo_no_cross_byproduct_if:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# echo_target_raw
|
||||
run_ninja(CustomCommandOutputGenex echo_target_raw-debug build-Debug.ninja echo_target_raw:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex echo_target_raw-debug-in-release-graph build-Release.ninja echo_target_raw:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# echo_target_genex
|
||||
run_ninja(CustomCommandOutputGenex echo_target_genex-debug build-Debug.ninja echo_target_genex:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex echo_target_genex-debug-in-release-graph build-Release.ninja echo_target_genex:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# echo_target_genex_out
|
||||
run_ninja(CustomCommandOutputGenex echo_target_genex_out-debug build-Debug.ninja echo_target_genex_out:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex echo_target_genex_out-debug-in-release-graph build-Release.ninja echo_target_genex_out:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
# echo_target_depend*
|
||||
run_ninja(CustomCommandOutputGenex echo_target_depend-debug build-Debug.ninja echo_target_depend:Debug)
|
||||
run_ninja(CustomCommandOutputGenex echo_target_depend_out-debug build-Debug.ninja echo_target_depend_out:Debug)
|
||||
run_ninja(CustomCommandOutputGenex echo_target_depend_cmd-debug build-Debug.ninja CMakeFiles/echo_target_depend_cmd-Debug) # undocumented
|
||||
run_ninja(CustomCommandOutputGenex echo_target_depend-debug-in-release-graph build-Release.ninja echo_target_depend:Debug)
|
||||
run_ninja(CustomCommandOutputGenex echo_target_depend_out-debug-in-release-graph build-Release.ninja echo_target_depend_out:Debug)
|
||||
run_ninja(CustomCommandOutputGenex echo_target_depend_cmd-debug-in-release-graph build-Release.ninja CMakeFiles/echo_target_depend_cmd-Debug) # undocumented
|
||||
# target_no_cross_*
|
||||
run_ninja(CustomCommandOutputGenex target_no_cross_byproduct-debug build-Debug.ninja target_no_cross_byproduct:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-debug-graph build-Debug.ninja -t clean)
|
||||
run_ninja(CustomCommandOutputGenex target_no_cross_byproduct-debug-in-release-graph build-Release.ninja target_no_cross_byproduct:Debug)
|
||||
run_ninja(CustomCommandOutputGenex clean-release-graph build-Release.ninja -t clean)
|
||||
unset(RunCMake_TEST_NO_CLEAN)
|
||||
|
||||
unset(RunCMake_TEST_BINARY_DIR)
|
||||
|
||||
run_cmake(CustomCommandDepfile)
|
||||
|
||||
21
Tests/RunCMake/NinjaMultiConfig/echo.c
Normal file
21
Tests/RunCMake/NinjaMultiConfig/echo.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <stdio.h>
|
||||
#if defined(_WIN32)
|
||||
# include <direct.h>
|
||||
# define getcwd _getcwd
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int i;
|
||||
char cwd[1024];
|
||||
if (getcwd(cwd, sizeof(cwd)) != NULL) {
|
||||
printf("'%s'$", cwd);
|
||||
}
|
||||
for (i = 0; i < argc; ++i) {
|
||||
printf(" '%s'", argv[i]);
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -44,4 +44,24 @@ CMake Error at BadByproduct.cmake:7 \(add_custom_command\):
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
)+(
|
||||
CMake Error at BadByproduct.cmake:8 \(add_custom_command\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<OUTPUT_CONFIG:h>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
)+(
|
||||
CMake Error at BadByproduct.cmake:9 \(add_custom_command\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<COMMAND_CONFIG:i>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
)+
|
||||
|
||||
@@ -5,3 +5,5 @@ add_custom_command(OUTPUT c BYPRODUCTS "a>")
|
||||
add_custom_command(OUTPUT d BYPRODUCTS "$<CONFIG>/#")
|
||||
add_custom_command(OUTPUT e BYPRODUCTS ${CMAKE_CURRENT_SOURCE_DIR}/f)
|
||||
add_custom_command(OUTPUT f BYPRODUCTS "$<TARGET_PROPERTY:prop>")
|
||||
add_custom_command(OUTPUT h BYPRODUCTS "$<OUTPUT_CONFIG:h>")
|
||||
add_custom_command(OUTPUT i BYPRODUCTS "$<COMMAND_CONFIG:i>")
|
||||
|
||||
1
Tests/RunCMake/add_custom_command/BadCommand-result.txt
Normal file
1
Tests/RunCMake/add_custom_command/BadCommand-result.txt
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
21
Tests/RunCMake/add_custom_command/BadCommand-stderr.txt
Normal file
21
Tests/RunCMake/add_custom_command/BadCommand-stderr.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
(CMake Error at BadCommand.cmake:1 \(add_custom_command\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<OUTPUT_CONFIG:a>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
|
||||
)+(CMake Error at BadCommand.cmake:2 \(add_custom_command\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<COMMAND_CONFIG:b>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
|
||||
)+
|
||||
3
Tests/RunCMake/add_custom_command/BadCommand.cmake
Normal file
3
Tests/RunCMake/add_custom_command/BadCommand.cmake
Normal file
@@ -0,0 +1,3 @@
|
||||
add_custom_command(OUTPUT "a" COMMAND "$<1:$<OUTPUT_CONFIG:a>>")
|
||||
add_custom_command(OUTPUT "b" COMMAND "$<1:$<COMMAND_CONFIG:b>>")
|
||||
add_custom_target(drive DEPENDS "a" "b")
|
||||
@@ -44,4 +44,24 @@ CMake Error at BadOutput.cmake:7 \(add_custom_command\):
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
)+(
|
||||
CMake Error at BadOutput.cmake:8 \(add_custom_command\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<OUTPUT_CONFIG:h>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
)+(
|
||||
CMake Error at BadOutput.cmake:9 \(add_custom_command\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<COMMAND_CONFIG:i>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
)+
|
||||
|
||||
@@ -5,3 +5,5 @@ add_custom_command(OUTPUT "a>" COMMAND c)
|
||||
add_custom_command(OUTPUT "$<CONFIG>/#" COMMAND d)
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/e COMMAND f)
|
||||
add_custom_command(OUTPUT "$<TARGET_PROPERTY:prop>" COMMAND g)
|
||||
add_custom_command(OUTPUT "$<OUTPUT_CONFIG:h>" COMMAND h)
|
||||
add_custom_command(OUTPUT "$<COMMAND_CONFIG:i>" COMMAND i)
|
||||
|
||||
@@ -6,6 +6,7 @@ run_cmake(AppendNotOutput)
|
||||
run_cmake(BadArgument)
|
||||
run_cmake(BadByproduct)
|
||||
run_cmake(BadOutput)
|
||||
run_cmake(BadCommand)
|
||||
run_cmake(GeneratedProperty)
|
||||
run_cmake(LiteralQuotes)
|
||||
run_cmake(NoArguments)
|
||||
|
||||
@@ -44,4 +44,24 @@ CMake Error at BadByproduct.cmake:7 \(add_custom_target\):
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
)+(
|
||||
CMake Error at BadByproduct.cmake:8 \(add_custom_target\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<OUTPUT_CONFIG:n>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
)+(
|
||||
CMake Error at BadByproduct.cmake:9 \(add_custom_target\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<COMMAND_CONFIG:p>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
)+
|
||||
|
||||
@@ -5,3 +5,5 @@ add_custom_target(e BYPRODUCTS "a>" COMMAND f)
|
||||
add_custom_target(g BYPRODUCTS "$<CONFIG>/#" COMMAND h)
|
||||
add_custom_target(i BYPRODUCTS ${CMAKE_CURRENT_SOURCE_DIR}/j COMMAND k)
|
||||
add_custom_target(l BYPRODUCTS "$<TARGET_PROPERTY:prop>" COMMAND m)
|
||||
add_custom_target(n BYPRODUCTS "$<OUTPUT_CONFIG:n>" COMMAND o)
|
||||
add_custom_target(p BYPRODUCTS "$<COMMAND_CONFIG:p>" COMMAND q)
|
||||
|
||||
1
Tests/RunCMake/add_custom_target/BadCommand-result.txt
Normal file
1
Tests/RunCMake/add_custom_target/BadCommand-result.txt
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
21
Tests/RunCMake/add_custom_target/BadCommand-stderr.txt
Normal file
21
Tests/RunCMake/add_custom_target/BadCommand-stderr.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
(CMake Error at BadCommand.cmake:1 \(add_custom_target\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<OUTPUT_CONFIG:a>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
|
||||
)+(CMake Error at BadCommand.cmake:1 \(add_custom_target\):
|
||||
Error evaluating generator expression:
|
||||
|
||||
\$<COMMAND_CONFIG:b>
|
||||
|
||||
Expression did not evaluate to a known generator expression
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
||||
|
||||
)+
|
||||
4
Tests/RunCMake/add_custom_target/BadCommand.cmake
Normal file
4
Tests/RunCMake/add_custom_target/BadCommand.cmake
Normal file
@@ -0,0 +1,4 @@
|
||||
add_custom_target(drive
|
||||
COMMAND "$<1:$<OUTPUT_CONFIG:a>>"
|
||||
COMMAND "$<1:$<COMMAND_CONFIG:b>>"
|
||||
)
|
||||
@@ -1,6 +1,7 @@
|
||||
include(RunCMake)
|
||||
|
||||
run_cmake(BadByproduct)
|
||||
run_cmake(BadCommand)
|
||||
run_cmake(BadTargetName)
|
||||
run_cmake(ByproductsNoCommand)
|
||||
run_cmake(CommandExpandsEmpty)
|
||||
|
||||
Reference in New Issue
Block a user