summaryrefslogtreecommitdiffstats
path: root/Tests/CustomCommand
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/CustomCommand
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/CustomCommand')
-rw-r--r--Tests/CustomCommand/CMakeLists.txt7
-rw-r--r--Tests/CustomCommand/config.h.in1
-rw-r--r--Tests/CustomCommand/foo.in3
3 files changed, 1 insertions, 10 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index 915da0a..57ffeec 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -164,13 +164,6 @@ add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/not_included.h
${PROJECT_BINARY_DIR}/not_included.h
)
-# Tell the executable where to find not_included.h.
-configure_file(
- ${PROJECT_SOURCE_DIR}/config.h.in
- ${PROJECT_BINARY_DIR}/config.h
- @ONLY
- )
-
# add the executable
add_executable(CustomCommand
${PROJECT_BINARY_DIR}/foo.h
diff --git a/Tests/CustomCommand/config.h.in b/Tests/CustomCommand/config.h.in
deleted file mode 100644
index 86c97bd..0000000
--- a/Tests/CustomCommand/config.h.in
+++ /dev/null
@@ -1 +0,0 @@
-#define PROJECT_BINARY_DIR "@PROJECT_BINARY_DIR@"
diff --git a/Tests/CustomCommand/foo.in b/Tests/CustomCommand/foo.in
index 0c5021c..e43aed1 100644
--- a/Tests/CustomCommand/foo.in
+++ b/Tests/CustomCommand/foo.in
@@ -1,6 +1,5 @@
#include "doc1.h"
#include "foo.h"
-#include "config.h"
#include <stdio.h>
@@ -11,7 +10,7 @@ int main ()
{
if (generated()*wrapped()*doc() == 3*5*7)
{
- FILE* fin = fopen(PROJECT_BINARY_DIR "/not_included.h", "r");
+ FILE* fin = fopen("not_included.h", "r");
if(fin)
{
fclose(fin);