View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015186CMakeCMakepublic2014-10-02 09:412015-04-06 09:07
ReporterClinton Stimpson 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0015186: target names restricted to ascii since 3.0
DescriptionUsing the project attached here:
http://www.cmake.org/Bug/view.php?id=14934 [^]

I get a warning:
CMake Warning (dev) at CMakeLists.txt:31 (add_executable):
  Policy CMP0037 is not set: Target names should not be reserved and should
  match a validity pattern. Run "cmake --help-policy CMP0037" for policy
  details. Use the cmake_policy command to set the policy and suppress this
  warning.

  The target name "教學程式" is reserved or not valid for certain CMake
  features, such as generator expressions, and may result in undefined
  behavior.


Additional InformationcmGeneratorExpression::IsValidTargetName() has this:

  static cmsys::RegularExpression targetNameValidator("^[A-Za-z0-9_.:+-]+$");
  return targetNameValidator.find(input);

Perhaps the regex can be inverted and specific characters which are disallowed should be searched for.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0036887)
Brad King (manager)
2014-10-02 09:45

Logical target names should be like C identifiers. The OUTPUT_NAME target property can be used to give the binary a fancy name.

We don't know the set of disallowed characters because lots of native tools have random limitations with non-C-identifer names. Even if we enumerated all known limitations now, new native tools in the future could add new ones.
(0036888)
Clinton Stimpson (developer)
2014-10-02 10:03

Ok. The OUTPUT_NAME solution works just fine.
(0038417)
Robert Maynard (manager)
2015-04-06 09:07

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2014-10-02 09:41 Clinton Stimpson New Issue
2014-10-02 09:45 Brad King Note Added: 0036887
2014-10-02 10:03 Clinton Stimpson Note Added: 0036888
2014-10-02 10:06 Brad King Status new => resolved
2014-10-02 10:06 Brad King Resolution open => won't fix
2015-04-06 09:07 Robert Maynard Note Added: 0038417
2015-04-06 09:07 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team