Where would I go within CMakeLists.txt in order to change the name of the generated file?
相关问题
- Avoid cmake to add the flags -search_paths_first a
- CMakeList file to generate LLVM bitcode file from
- How to fix NDK build error for HelloCardboard samp
- Linking against GLEW with CMake
- Linking libavcodec in Cmake, find_library won'
相关文章
- Target requires the language dialect “CXX17” (with
- How do I tell cmake not to create a console window
- Do something for all targets
- CMake: Replace compile flags of an INTERFACE targe
- Generate Web Assembly from CMake Project with a Sp
- Integrate ITK (Insight Toolkit) into own project
- Is there a way to disallow “experimental” C++17 in
- CMake properties and expanding generator expressio
Here's a simple CMakeLists.txt
This CMakeLists.txt compiles a hello.cpp file to an executable named hello. You can name the executable anything by using the
add_executable
statement.For an executable target see target properties OUTPUT_NAME and SUFFIX. The actual output name if a combination of
OUTPUT_NAME
.SUFFIX
withOUTPUT_NAME
defaulting to the target's nameSUFFIX
defaulting to.exe
on Windows platforms)So the following example would override both defaults:
Would generate
myname.myext
for targeta
.For more details e.g. take a look at adding program suffix.