summaryrefslogtreecommitdiffstats
path: root/Tests/OutDir/OutDir.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2014-12-27 04:19:14 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2015-01-09 03:56:51 (GMT)
commit9a8ab86645b0ea1fcbd1b069694d0cbb4fa2621a (patch)
treed6cfe01924dd4c3ca3f57acd5d3fa59b60cde4fa /Tests/OutDir/OutDir.cmake
parent7ecbade8877522d9d565bcb2216f71426873f564 (diff)
downloadCMake-9a8ab86645b0ea1fcbd1b069694d0cbb4fa2621a.zip
CMake-9a8ab86645b0ea1fcbd1b069694d0cbb4fa2621a.tar.gz
CMake-9a8ab86645b0ea1fcbd1b069694d0cbb4fa2621a.tar.bz2
Encoding: Modify tests to work using non-ascii paths.
For complex*, CustomCommand and OutDir tests, non-ascii paths are avoided in test code by using relative paths, and setting the working when running the test. This also avoids the need to internationalize the test code. For RunCMake.GeneratorExpression, use a UTF-8 encoding in file(STRINGS) to retrieve the compiled absolute path correctly.
Diffstat (limited to 'Tests/OutDir/OutDir.cmake')
-rw-r--r--Tests/OutDir/OutDir.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/Tests/OutDir/OutDir.cmake b/Tests/OutDir/OutDir.cmake
index e1e6b7f..a1f13e7 100644
--- a/Tests/OutDir/OutDir.cmake
+++ b/Tests/OutDir/OutDir.cmake
@@ -16,13 +16,17 @@ find_program(CONLY_EXE
PATHS ${top}/runtime
NO_DEFAULT_PATH)
+file(RELATIVE_PATH TESTC1_LIB_FILE "${top}" "${TESTC1_LIB}")
+file(RELATIVE_PATH TESTC2_LIB_FILE "${top}" "${TESTC2_LIB}")
+file(RELATIVE_PATH CONLY_EXE_FILE "${top}" "${CONLY_EXE}")
+
file(WRITE ${top}/OutDir.h "/* Generated by ${CMAKE_CURRENT_LIST_FILE} */
#ifndef OutDir_h
#define OutDir_h
-#define TESTC1_LIB \"${TESTC1_LIB}\"
-#define TESTC2_LIB \"${TESTC2_LIB}\"
-#define CONLY_EXE \"${CONLY_EXE}\"
+#define TESTC1_LIB \"${TESTC1_LIB_FILE}\"
+#define TESTC2_LIB \"${TESTC2_LIB_FILE}\"
+#define CONLY_EXE \"${CONLY_EXE_FILE}\"
#endif
")