[CMakeList generator] Fix executable name
Treble genererated project name feature character no accepted by CMake. So far only @ is a problem. Change-Id: Iac460033f1181f46ab8205e5706271f99ab798d3
This commit is contained in:
parent
e7ee3c7bc2
commit
7da4926263
1 changed files with 7 additions and 1 deletions
|
@ -163,9 +163,15 @@ func generateCLionProject(compiledModule CompiledInterface, ctx blueprint.Single
|
|||
translateToCMake(cppParameters, f, false, true)
|
||||
|
||||
// Add project executable.
|
||||
f.WriteString(fmt.Sprintf("\nadd_executable(%s ${SOURCE_FILES})\n", ccModule.ModuleBase.Name()))
|
||||
f.WriteString(fmt.Sprintf("\nadd_executable(%s ${SOURCE_FILES})\n",
|
||||
cleanExecutableName(ccModule.ModuleBase.Name())))
|
||||
}
|
||||
|
||||
func cleanExecutableName(s string) string {
|
||||
return strings.Replace(s, "@", "-", -1)
|
||||
}
|
||||
|
||||
|
||||
func translateToCMake(c compilerParameters, f *os.File, cflags bool, cppflags bool) {
|
||||
writeAllSystemDirectories(c.systemHeaderSearchPath, f)
|
||||
writeAllIncludeDirectories(c.headerSearchPath, f)
|
||||
|
|
Loading…
Reference in a new issue