|
@@ -76,6 +76,18 @@ function (run_symlink_test case src bin src_from_bin bin_from_src)
|
|
|
run_symlink_test_case("${case}" -S "../${name}/${src}" -B "../${name}/${bin}")
|
|
run_symlink_test_case("${case}" -S "../${name}/${src}" -B "../${name}/${bin}")
|
|
|
|
|
|
|
|
# Verify paths passed to compiler.
|
|
# Verify paths passed to compiler.
|
|
|
|
|
+ if(case MATCHES "^(different|asymmetric)-bin_in_src$")
|
|
|
|
|
+ # FIXME: Some generators compute incorrect relative paths.
|
|
|
|
|
+ message(STATUS "${case}-exe - SKIPPED")
|
|
|
|
|
+ message(STATUS "${case}-exe-build - SKIPPED")
|
|
|
|
|
+ return()
|
|
|
|
|
+ endif()
|
|
|
|
|
+ if(case MATCHES "^(different|asymmetric)-src_in_bin$" AND RunCMake_GENERATOR STREQUAL "Xcode")
|
|
|
|
|
+ # FIXME: The Xcode generator computes an incorrect relative path.
|
|
|
|
|
+ message(STATUS "${case}-exe - SKIPPED")
|
|
|
|
|
+ message(STATUS "${case}-exe-build - SKIPPED")
|
|
|
|
|
+ return()
|
|
|
|
|
+ endif()
|
|
|
unset(RunCMake_TEST_VARIANT_DESCRIPTION)
|
|
unset(RunCMake_TEST_VARIANT_DESCRIPTION)
|
|
|
run_symlink_test_case("${case}-exe" -S "${src}" -B "${bin}")
|
|
run_symlink_test_case("${case}-exe" -S "${src}" -B "${bin}")
|
|
|
if (RunCMake_GENERATOR MATCHES "Xcode")
|
|
if (RunCMake_GENERATOR MATCHES "Xcode")
|
|
@@ -86,6 +98,33 @@ function (run_symlink_test case src bin src_from_bin bin_from_src)
|
|
|
run_cmake_command("${case}-exe-build" ${CMAKE_COMMAND} --build "${bin}")
|
|
run_cmake_command("${case}-exe-build" ${CMAKE_COMMAND} --build "${bin}")
|
|
|
endfunction ()
|
|
endfunction ()
|
|
|
|
|
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../none/source
|
|
|
|
|
+# .../none/binary
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/none")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/none/source")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/none/binary")
|
|
|
|
|
+run_symlink_test(none-separate "source" "binary" "../source" "../binary")
|
|
|
|
|
+
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../none/source
|
|
|
|
|
+# .../none/source/binary
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/none")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/none/source")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/none/source/binary")
|
|
|
|
|
+run_symlink_test(none-bin_in_src "source" "source/binary" ".." "binary")
|
|
|
|
|
+
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../none/binary
|
|
|
|
|
+# .../none/binary/source
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/none")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/none/binary")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/none/binary/source")
|
|
|
|
|
+run_symlink_test(none-src_in_bin "binary/source" "binary" "source" "..")
|
|
|
|
|
+
|
|
|
# Create the following structure:
|
|
# Create the following structure:
|
|
|
#
|
|
#
|
|
|
# .../common_real/source
|
|
# .../common_real/source
|
|
@@ -97,3 +136,111 @@ file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/common_real/source")
|
|
|
file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/common_real/binary")
|
|
file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/common_real/binary")
|
|
|
file(CREATE_LINK "common_real" "${RunCMake_BINARY_DIR}/common" SYMBOLIC)
|
|
file(CREATE_LINK "common_real" "${RunCMake_BINARY_DIR}/common" SYMBOLIC)
|
|
|
run_symlink_test(common-separate "source" "binary" "../source" "../binary")
|
|
run_symlink_test(common-separate "source" "binary" "../source" "../binary")
|
|
|
|
|
+
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../common_real/source
|
|
|
|
|
+# .../common_real/source/binary
|
|
|
|
|
+# .../common -> common_real
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/common_real")
|
|
|
|
|
+file(REMOVE "${RunCMake_BINARY_DIR}/common")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/common_real/source")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/common_real/source/binary")
|
|
|
|
|
+file(CREATE_LINK "common_real" "${RunCMake_BINARY_DIR}/common" SYMBOLIC)
|
|
|
|
|
+run_symlink_test(common-bin_in_src "source" "source/binary" ".." "binary")
|
|
|
|
|
+
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../common_real/binary
|
|
|
|
|
+# .../common_real/binary/source
|
|
|
|
|
+# .../common -> common_real
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/common_real")
|
|
|
|
|
+file(REMOVE "${RunCMake_BINARY_DIR}/common")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/common_real/binary")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/common_real/binary/source")
|
|
|
|
|
+file(CREATE_LINK "common_real" "${RunCMake_BINARY_DIR}/common" SYMBOLIC)
|
|
|
|
|
+run_symlink_test(common-src_in_bin "binary/source" "binary" "source" "..")
|
|
|
|
|
+
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../different_src/source_real
|
|
|
|
|
+# .../different_bin/binary_real
|
|
|
|
|
+# .../different/source -> ../different_src/source_real
|
|
|
|
|
+# .../different/binary -> ../different_bin/binary_real
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/different")
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/different_src")
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/different_bin")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/different")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/different_src/source_real")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/different_bin/binary_real")
|
|
|
|
|
+file(CREATE_LINK "../different_src/source_real" "${RunCMake_BINARY_DIR}/different/source" SYMBOLIC)
|
|
|
|
|
+file(CREATE_LINK "../different_bin/binary_real" "${RunCMake_BINARY_DIR}/different/binary" SYMBOLIC)
|
|
|
|
|
+run_symlink_test(different-separate "source" "binary" "../../different/source" "../../different/binary")
|
|
|
|
|
+
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../different_src/source_real
|
|
|
|
|
+# .../different_bin/binary_real
|
|
|
|
|
+# .../different/source -> ../different_src/source_real
|
|
|
|
|
+# .../different_src/source_real/binary -> ../../different_bin/binary_real
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/different")
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/different_src")
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/different_bin")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/different")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/different_src/source_real")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/different_bin/binary_real")
|
|
|
|
|
+file(CREATE_LINK "../different_src/source_real" "${RunCMake_BINARY_DIR}/different/source" SYMBOLIC)
|
|
|
|
|
+file(CREATE_LINK "../../different_bin/binary_real" "${RunCMake_BINARY_DIR}/different_src/source_real/binary" SYMBOLIC)
|
|
|
|
|
+run_symlink_test(different-bin_in_src "source" "source/binary" "../../different/source" "binary")
|
|
|
|
|
+
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../different_src/source_real
|
|
|
|
|
+# .../different_bin/binary_real
|
|
|
|
|
+# .../different/binary -> ../different_bin/binary_real
|
|
|
|
|
+# .../different_bin/binary_real/source -> ../../different_src/source_real
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/different")
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/different_src")
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/different_bin")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/different")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/different_src/source_real")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/different_bin/binary_real")
|
|
|
|
|
+file(CREATE_LINK "../different_bin/binary_real" "${RunCMake_BINARY_DIR}/different/binary" SYMBOLIC)
|
|
|
|
|
+file(CREATE_LINK "../../different_src/source_real" "${RunCMake_BINARY_DIR}/different_bin/binary_real/source" SYMBOLIC)
|
|
|
|
|
+run_symlink_test(different-src_in_bin "binary/source" "binary" "source" "../../different/binary")
|
|
|
|
|
+
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../asymmetric_real/path/binary
|
|
|
|
|
+# .../asymmetric/source
|
|
|
|
|
+# .../asymmetric/binary -> ../asymmetric_real/path/binary
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/asymmetric")
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/asymmetric_real")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/asymmetric/source")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/asymmetric_real/path/binary")
|
|
|
|
|
+file(CREATE_LINK "../asymmetric_real/path/binary" "${RunCMake_BINARY_DIR}/asymmetric/binary" SYMBOLIC)
|
|
|
|
|
+run_symlink_test(asymmetric-separate "source" "binary" "../../../asymmetric/source" "../binary")
|
|
|
|
|
+
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../asymmetric_real/path/binary
|
|
|
|
|
+# .../asymmetric/source
|
|
|
|
|
+# .../asymmetric/source/binary -> ../../asymmetric_real/path/binary
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/asymmetric")
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/asymmetric_real")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/asymmetric/source")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/asymmetric_real/path/binary")
|
|
|
|
|
+file(CREATE_LINK "../../asymmetric_real/path/binary" "${RunCMake_BINARY_DIR}/asymmetric/source/binary" SYMBOLIC)
|
|
|
|
|
+run_symlink_test(asymmetric-bin_in_src "source" "source/binary" "../../../asymmetric/source" "binary")
|
|
|
|
|
+
|
|
|
|
|
+# Create the following structure:
|
|
|
|
|
+#
|
|
|
|
|
+# .../asymmetric_real/path/source
|
|
|
|
|
+# .../asymmetric/binary
|
|
|
|
|
+# .../asymmetric/binary/source -> ../../asymmetric_real/path/source
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/asymmetric")
|
|
|
|
|
+file(REMOVE_RECURSE "${RunCMake_BINARY_DIR}/asymmetric_real")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/asymmetric/binary")
|
|
|
|
|
+file(MAKE_DIRECTORY "${RunCMake_BINARY_DIR}/asymmetric_real/path/source")
|
|
|
|
|
+file(CREATE_LINK "../../asymmetric_real/path/source" "${RunCMake_BINARY_DIR}/asymmetric/binary/source" SYMBOLIC)
|
|
|
|
|
+run_symlink_test(asymmetric-src_in_bin "binary/source" "binary" "source" "../../../asymmetric/binary")
|