diff options
author | Brad King <brad.king@kitware.com> | 2018-09-19 11:43:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-09-19 12:14:48 (GMT) |
commit | 2428422c02de1feac008d2ba1a6ad075aaf7ba2c (patch) | |
tree | 4597e1d5a338aba37f4615558db6863bd8e13872 /Tests/OutName | |
parent | d686f81e58200c68c1e89094210e9587e0e90983 (diff) | |
download | CMake-2428422c02de1feac008d2ba1a6ad075aaf7ba2c.zip CMake-2428422c02de1feac008d2ba1a6ad075aaf7ba2c.tar.gz CMake-2428422c02de1feac008d2ba1a6ad075aaf7ba2c.tar.bz2 |
Fix regression in target output file naming logic
Refactoring in commit f4ff60a803 (cmMakefile: Make GetSafeDefinition
return std::string const&, 2018-09-05) accidentally changed the logic
for target artifact prefix and suffix names such that setting a PREFIX
or SUFFIX target property would cause an empty value to be used. Revert
that part of the change and use a simpler alternative. Add a test case.
Reported-by: Alan W. Irwin <irwin@beluga.phys.uvic.ca>
Diffstat (limited to 'Tests/OutName')
-rw-r--r-- | Tests/OutName/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/OutName/main.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/OutName/CMakeLists.txt b/Tests/OutName/CMakeLists.txt new file mode 100644 index 0000000..f024def --- /dev/null +++ b/Tests/OutName/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.12) +project(OutName C) + +add_executable(OutName main.c) +set_property(TARGET OutName PROPERTY PREFIX exe.) +set_property(TARGET OutName PROPERTY SUFFIX .exe) diff --git a/Tests/OutName/main.c b/Tests/OutName/main.c new file mode 100644 index 0000000..8488f4e --- /dev/null +++ b/Tests/OutName/main.c @@ -0,0 +1,4 @@ +int main(void) +{ + return 0; +} |