summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-08 11:53:01 -0400
committerBrad King <brad.king@kitware.com>2017-06-08 13:31:33 -0400
commit69050f4d16ae649e074b5fd7cb3bae1811b403a8 (patch)
tree775341e68bf2dc481f3252b2526e8c28a7d0bb58
parentc41a7c7d90e1fca52896dfeb99b7efd717aa6262 (diff)
downloadcmake-69050f4d16ae649e074b5fd7cb3bae1811b403a8.tar.gz
Tests: Use full output paths in file(GENERATE) calls
We don't define behavior for relative paths to the OUTPUT argument. Fix our tests to use full paths.
-rw-r--r--Tests/RunCMake/BuildDepends/C-Exe-Manifest.cmake2
-rw-r--r--Tests/RunCMake/BuildDepends/C-Exe.cmake2
-rw-r--r--Tests/RunCMake/BuildDepends/Custom-Always.cmake2
-rw-r--r--Tests/RunCMake/BuildDepends/Custom-Symbolic-and-Byproduct.cmake2
-rw-r--r--Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake2
-rw-r--r--Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake2
-rw-r--r--Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake2
-rw-r--r--Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake2
-rw-r--r--Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/ReRunCMake.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/WriteIfDifferent.cmake2
-rw-r--r--Tests/RunCMake/Framework/FrameworkLayout.cmake2
-rw-r--r--Tests/RunCMake/TargetObjects/NoTarget.cmake4
-rw-r--r--Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake2
15 files changed, 16 insertions, 16 deletions
diff --git a/Tests/RunCMake/BuildDepends/C-Exe-Manifest.cmake b/Tests/RunCMake/BuildDepends/C-Exe-Manifest.cmake
index ef3301216a..87b0de0104 100644
--- a/Tests/RunCMake/BuildDepends/C-Exe-Manifest.cmake
+++ b/Tests/RunCMake/BuildDepends/C-Exe-Manifest.cmake
@@ -11,7 +11,7 @@ endif()
]])
endif()
-file(GENERATE OUTPUT check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
set(check_pairs
\"$<TARGET_FILE:main>|${CMAKE_CURRENT_BINARY_DIR}/test.manifest\"
)
diff --git a/Tests/RunCMake/BuildDepends/C-Exe.cmake b/Tests/RunCMake/BuildDepends/C-Exe.cmake
index 5057ca91dc..ad5cd4d47c 100644
--- a/Tests/RunCMake/BuildDepends/C-Exe.cmake
+++ b/Tests/RunCMake/BuildDepends/C-Exe.cmake
@@ -2,7 +2,7 @@ enable_language(C)
add_executable(main ${CMAKE_CURRENT_BINARY_DIR}/main.c)
-file(GENERATE OUTPUT check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
set(check_pairs
\"$<TARGET_FILE:main>|${CMAKE_CURRENT_BINARY_DIR}/main.c\"
)
diff --git a/Tests/RunCMake/BuildDepends/Custom-Always.cmake b/Tests/RunCMake/BuildDepends/Custom-Always.cmake
index d412708a1f..c7e7fb0bc7 100644
--- a/Tests/RunCMake/BuildDepends/Custom-Always.cmake
+++ b/Tests/RunCMake/BuildDepends/Custom-Always.cmake
@@ -16,7 +16,7 @@ add_custom_command(
add_custom_target(drive ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/after-always)
-file(GENERATE OUTPUT check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
set(check_pairs
\"${CMAKE_CURRENT_BINARY_DIR}/always-updated|${CMAKE_CURRENT_BINARY_DIR}/before-always\"
\"${CMAKE_CURRENT_BINARY_DIR}/after-always|${CMAKE_CURRENT_BINARY_DIR}/always-updated\"
diff --git a/Tests/RunCMake/BuildDepends/Custom-Symbolic-and-Byproduct.cmake b/Tests/RunCMake/BuildDepends/Custom-Symbolic-and-Byproduct.cmake
index 687c8271fd..1e1f22ad08 100644
--- a/Tests/RunCMake/BuildDepends/Custom-Symbolic-and-Byproduct.cmake
+++ b/Tests/RunCMake/BuildDepends/Custom-Symbolic-and-Byproduct.cmake
@@ -16,7 +16,7 @@ add_custom_command(
add_custom_target(drive ALL DEPENDS use-byproduct)
add_dependencies(drive produce)
-file(GENERATE OUTPUT check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
if (check_step EQUAL 1)
set(check_pairs
\"${CMAKE_CURRENT_BINARY_DIR}/use-byproduct|${CMAKE_CURRENT_BINARY_DIR}/gen-byproduct-stamp\"
diff --git a/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake
index 0f92e0edbd..8b2ae78cfb 100644
--- a/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake
+++ b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake
@@ -6,7 +6,7 @@ add_custom_command(
add_custom_target(generate ALL DEPENDS output.cxx)
set_property(TARGET generate PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR})
-file(GENERATE OUTPUT check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
set(check_pairs
\"${CMAKE_CURRENT_BINARY_DIR}/output.cxx|${CMAKE_CURRENT_BINARY_DIR}/MakeCustomIncludes.h\"
)
diff --git a/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake b/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake
index add9aeb693..af6ad86ba8 100644
--- a/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake
+++ b/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake
@@ -3,7 +3,7 @@ get_filename_component(include_dir "${CMAKE_BINARY_DIR}" PATH)
include_directories("${include_dir}")
add_executable(MakeInProjectOnly MakeInProjectOnly.c)
set(CMAKE_DEPENDS_IN_PROJECT_ONLY 1)
-file(GENERATE OUTPUT check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
if (check_step EQUAL 1)
set(check_pairs
\"$<TARGET_FILE:MakeInProjectOnly>|${include_dir}/MakeInProjectOnly.h\"
diff --git a/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake b/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake
index 1a373b9281..8fc1218f22 100644
--- a/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake
+++ b/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake
@@ -1,6 +1,6 @@
add_executable(mytest test.cpp)
-file(GENERATE OUTPUT runtest_info.cmake CONTENT [[
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtest_info.cmake CONTENT [[
set(EXPECTED_MYTEST_NAME "$<TARGET_FILE_NAME:mytest>")
]])
diff --git a/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake b/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake
index 77fe8ed5d8..b23d3c7df3 100644
--- a/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake
+++ b/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake
@@ -6,7 +6,7 @@ foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES)
OUTPUT_NAME_${UPPER_CONFIG} bar_${CONFIG})
endforeach()
-file(GENERATE OUTPUT runtest_info_$<CONFIG>.cmake CONTENT [[
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtest_info_$<CONFIG>.cmake CONTENT [[
set(CPACK_BUILD_CONFIG "$<CONFIG>")
set(EXPECTED_MYTEST_NAME "$<TARGET_FILE_NAME:mytest>")
]])
diff --git a/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake b/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake
index 2e1d4656cb..2001d9f4cb 100644
--- a/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake
+++ b/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake
@@ -1,6 +1,6 @@
add_executable(mytest test.cpp)
-file(GENERATE OUTPUT runtest_info.cmake CONTENT [[
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtest_info.cmake CONTENT [[
set(EXPECTED_MYTEST_NAME "$<TARGET_FILE_NAME:mytest>")
]])
diff --git a/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake b/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake
index e2b081d482..59ccf197d9 100644
--- a/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake
+++ b/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake
@@ -7,6 +7,6 @@ target_compile_options(empty
)
file(GENERATE
- OUTPUT opts-$<COMPILE_LANGUAGE>.txt
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/opts-$<COMPILE_LANGUAGE>.txt
CONTENT "$<TARGET_PROPERTY:empty,COMPILE_OPTIONS>\n"
)
diff --git a/Tests/RunCMake/File_Generate/ReRunCMake.cmake b/Tests/RunCMake/File_Generate/ReRunCMake.cmake
index 109d60e6fe..541d86df25 100644
--- a/Tests/RunCMake/File_Generate/ReRunCMake.cmake
+++ b/Tests/RunCMake/File_Generate/ReRunCMake.cmake
@@ -1,5 +1,5 @@
file(GENERATE
- OUTPUT output_file.txt
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/output_file.txt"
INPUT "${CMAKE_CURRENT_BINARY_DIR}/input_file.txt"
)
diff --git a/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake b/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake
index d1d832a111..bb36a4c48e 100644
--- a/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake
+++ b/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake
@@ -1,5 +1,5 @@
file(GENERATE
- OUTPUT output_file.txt
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/output_file.txt
CONTENT "123"
)
diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake
index 3d62a8af34..4f4245952a 100644
--- a/Tests/RunCMake/Framework/FrameworkLayout.cmake
+++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake
@@ -22,4 +22,4 @@ set_source_files_properties(some.txt PROPERTIES MACOSX_PACKAGE_LOCATION somedir)
add_custom_command(TARGET Framework POST_BUILD
COMMAND /usr/bin/file $<TARGET_FILE:Framework>)
-file(GENERATE OUTPUT FrameworkName.cmake CONTENT "set(framework-dir \"$<TARGET_BUNDLE_DIR:Framework>\")\n")
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/FrameworkName.cmake CONTENT "set(framework-dir \"$<TARGET_BUNDLE_DIR:Framework>\")\n")
diff --git a/Tests/RunCMake/TargetObjects/NoTarget.cmake b/Tests/RunCMake/TargetObjects/NoTarget.cmake
index 5d7e33e792..268577d50c 100644
--- a/Tests/RunCMake/TargetObjects/NoTarget.cmake
+++ b/Tests/RunCMake/TargetObjects/NoTarget.cmake
@@ -1,7 +1,7 @@
add_library(iface INTERFACE)
target_sources(iface INTERFACE $<TARGET_OBJECTS:NoTarget>)
-file(GENERATE OUTPUT test_output CONTENT $<TARGET_OBJECTS:NoTarget>)
-file(GENERATE OUTPUT test_output2 CONTENT $<TARGET_PROPERTY:iface,INTERFACE_SOURCES>)
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_output CONTENT $<TARGET_OBJECTS:NoTarget>)
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_output2 CONTENT $<TARGET_PROPERTY:iface,INTERFACE_SOURCES>)
install(FILES $<TARGET_OBJECTS:NoTarget> DESTINATION objects)
diff --git a/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake b/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake
index 8e5fdd047a..3bb3e374d2 100644
--- a/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake
+++ b/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake
@@ -1,3 +1,3 @@
add_library(StaticLib empty.cpp)
-file(GENERATE OUTPUT test_output CONTENT $<TARGET_OBJECTS:StaticLib>)
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_output CONTENT $<TARGET_OBJECTS:StaticLib>)