mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 23:00:50 +08:00
@@ -311,6 +311,11 @@ int do_cmake(int ac, char const* const* av)
|
|||||||
}
|
}
|
||||||
return 1; // failed to parse
|
return 1; // failed to parse
|
||||||
}
|
}
|
||||||
|
// Only in script mode do we stop parsing instead
|
||||||
|
// of preferring the last mode flag provided
|
||||||
|
if (arg == "--" && workingMode == cmake::SCRIPT_MODE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!matched) {
|
if (!matched) {
|
||||||
parsedArgs.emplace_back(av[i]);
|
parsedArgs.emplace_back(av[i]);
|
||||||
|
10
Tests/RunCMake/CommandLine/P_P_in_arbitrary_args-stdout.txt
Normal file
10
Tests/RunCMake/CommandLine/P_P_in_arbitrary_args-stdout.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
^-- CMAKE_ARGC='6'
|
||||||
|
-- CMAKE_ARGV1='-P'
|
||||||
|
-- CMAKE_ARGV2='[^']*/Tests/RunCMake/CommandLine/P_arbitrary_args.cmake'
|
||||||
|
-- CMAKE_ARGV3='--'
|
||||||
|
-- CMAKE_ARGV4='-P'
|
||||||
|
-- CMAKE_ARGV5='[^']*/Tests/RunCMake/CommandLine/non_existing.cmake'
|
||||||
|
-- CMAKE_ARGV6=''
|
||||||
|
-- CMAKE_ARGV7=''
|
||||||
|
-- CMAKE_ARGV8=''
|
||||||
|
-- CMAKE_ARGV9=''$
|
@@ -54,6 +54,7 @@ run_cmake_command(P_no-arg ${CMAKE_COMMAND} -P)
|
|||||||
run_cmake_command(P_no-file ${CMAKE_COMMAND} -P nosuchscriptfile.cmake)
|
run_cmake_command(P_no-file ${CMAKE_COMMAND} -P nosuchscriptfile.cmake)
|
||||||
run_cmake_command(P_args ${CMAKE_COMMAND} -P "${RunCMake_SOURCE_DIR}/P_args.cmake" relative/path "${RunCMake_SOURCE_DIR}")
|
run_cmake_command(P_args ${CMAKE_COMMAND} -P "${RunCMake_SOURCE_DIR}/P_args.cmake" relative/path "${RunCMake_SOURCE_DIR}")
|
||||||
run_cmake_command(P_arbitrary_args ${CMAKE_COMMAND} -P "${RunCMake_SOURCE_DIR}/P_arbitrary_args.cmake" -- -DFOO -S -B --fresh --version)
|
run_cmake_command(P_arbitrary_args ${CMAKE_COMMAND} -P "${RunCMake_SOURCE_DIR}/P_arbitrary_args.cmake" -- -DFOO -S -B --fresh --version)
|
||||||
|
run_cmake_command(P_P_in_arbitrary_args ${CMAKE_COMMAND} -P "${RunCMake_SOURCE_DIR}/P_arbitrary_args.cmake" -- -P "${RunCMake_SOURCE_DIR}/non_existing.cmake")
|
||||||
run_cmake_command(P_fresh ${CMAKE_COMMAND} -P "${RunCMake_SOURCE_DIR}/P_fresh.cmake" --fresh)
|
run_cmake_command(P_fresh ${CMAKE_COMMAND} -P "${RunCMake_SOURCE_DIR}/P_fresh.cmake" --fresh)
|
||||||
|
|
||||||
run_cmake_command(build-no-dir
|
run_cmake_command(build-no-dir
|
||||||
|
Reference in New Issue
Block a user