2013/3/11 Yngve Inntjore Levinsen <yngve.levin...@gmail.com>: > On 11/03/13 08:57, Chandan Choudhury wrote:
> > > Hi, > > Do you mean how to add it to the CMakeLists.txt files? I sometimes use the > target property OUTPUT_NAME: > > add_executable(mybin ${sources}) > set_target_properties(mybin PROPERTIES OUTPUT_NAME "mybin${BINARY_POSTFIX}") > > Then, you can add your own suffix with: > > cmake -DBINARY_POSTFIX=<suffix> ../ > > If there is any "official" cmake variables to use for this I am not aware of > it (but I am no cmake developer neither). I think Chandan meant "globally" for all executables. That's the purpose of CMAKE_EXECUTABLE_SUFFIX as already pointed out by Michael. see : cmake --help-variable "CMAKE_EXECUTABLE_SUFFIX" Now it doesn't seems to work for Chandan. I guess the variable is forcibly written by "CMakeGenericSystem.cmake" during early CMake startup. So that you cannot overwrite its value on the command line. try to add "variable_watch(CMAKE_EXECUTABLE_SUFFIX)" at the very top of main CMakeLists.txt You may try to do that from within the CMakeLists.txt after the "project(...)" statement (or enable_language) -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake