diff options
Diffstat (limited to 'Tests/RunCMake')
6 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CMakeLists.txt b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CMakeLists.txt new file mode 100644 index 0000000..bbc08e6 --- /dev/null +++ b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.21) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar-build-stdout.txt b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar-build-stdout.txt new file mode 100644 index 0000000..f0f2efc --- /dev/null +++ b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar-build-stdout.txt @@ -0,0 +1 @@ +This message is printed by echo_message.bat diff --git a/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar.cmake b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar.cmake new file mode 100644 index 0000000..63d6068 --- /dev/null +++ b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/CheckEnvironmentVar.cmake @@ -0,0 +1,2 @@ +set(CMAKE_MSVCIDE_RUN_PATH "${CMAKE_SOURCE_DIR}") +add_custom_target(main COMMAND echo_message) diff --git a/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/RunCMakeTest.cmake b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/RunCMakeTest.cmake new file mode 100644 index 0000000..a424ff2 --- /dev/null +++ b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/RunCMakeTest.cmake @@ -0,0 +1,8 @@ +include(RunCMake) + +set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CheckEnvironmentVar-build) +run_cmake(CheckEnvironmentVar) +set(RunCMake_TEST_NO_CLEAN 1) +run_cmake_command(CheckEnvironmentVar-build ${CMAKE_COMMAND} --build . --config Debug --target main) +unset(RunCMake_TEST_BINARY_DIR) +unset(RunCMake_TEST_NO_CLEAN) diff --git a/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/echo_message.bat b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/echo_message.bat new file mode 100755 index 0000000..9037d02 --- /dev/null +++ b/Tests/RunCMake/CMAKE_MSVCIDE_RUN_PATH/echo_message.bat @@ -0,0 +1 @@ +echo This message is printed by echo_message.bat diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 961c54b..da79e0e 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -555,6 +555,7 @@ if(CMake_TEST_FindGTK2) endif() if("${CMAKE_GENERATOR}" MATCHES "Visual Studio") + add_RunCMake_test(CMAKE_MSVCIDE_RUN_PATH) add_RunCMake_test(include_external_msproject -DVS_PLATFORM_NAME=${CMAKE_VS_PLATFORM_NAME}) if("${CMAKE_GENERATOR}" MATCHES "Visual Studio (9|10)" AND NOT CMAKE_VS_DEVENV_COMMAND) set(NO_USE_FOLDERS 1) |