# Strange executable name when setting SUFFIX and VERSION

**URL:** https://discourse.cmake.org/t/strange-executable-name-when-setting-suffix-and-version/14292
**Category:** Usage
**Tags:** os:linux
**Created:** [June 27, 2025, 12:37pm UTC](https://discourse.cmake.org/t/strange-executable-name-when-setting-suffix-and-version/14292 "2025-06-27T12:37:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![JonTheBurger](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jontheburger/32/1873_2.png) [@JonTheBurger](https://discourse.cmake.org/u/JonTheBurger)
#### Post date: [June 27, 2025, 12:37pm UTC](https://discourse.cmake.org/t/strange-executable-name-when-setting-suffix-and-version/14292/1 "2025-06-27T12:37:27Z")

</div>

On Windows, the following snippet creates a `main-1.2.3.elf` (with both GCC and MSVC). However on Linux, it creates `main.elf-1.2.3`. I tried to also set `OUTPUT_NAME main-1.2.3` to override the version string it added, but that creates `main-1.2.3.elf-1.2.3`. Is there a way I can both set the `VERSION` property and control the `OUTPUT_NAME` of an executable on Linux?

```cmake
cmake_minimum_required(VERSION 3.28)
project(Project)
add_executable(main main.c)
set_target_properties(
  main
  PROPERTIES
    VERSION 1.2.3
    SUFFIX .elf
)

```
