0

I want to generate a stream.elf file using CMake. I can output an executable but can't make the elf format of my project.

My CMakeLists.txt is the next one

cmake_minimum_required(VERSION 2.8)
project( Stream )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -fpermissive -o Stream-bin")
find_package( OpenCV REQUIRED )
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/shareFile/xilinx src_xilinx)
add_executable( Stream ${src_xilinx} stream.cpp shareFile/linuxmmap.cpp )
target_include_directories( Stream PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/shareFile ${CMAKE_CURRENT_SOURCE_DIR}/shareFile/xilinx)
target_link_libraries( Stream ${OpenCV_LIBS} )

I've been searching through the web and I've found that using the

 gcc -Wall -g hello-world.c -o hello-world-bin

command, an elf output is generated, however, didn't find how to do the same with my CMakeLists.txt

Thanks!

Rendres
  • 133
  • 3
  • 12
  • I think you are referring to [this question](http://stackoverflow.com/questions/21689261/how-can-i-generate-the-elf-file-on-linux). So what do you like to do? Just change the executable outputs name? You can't do this with adding `-o Stream-bin`, but have to use `set_target_properties(Stream PROPERTIES OUTPUT_NAME "Stream-bin")`. – Florian Apr 11 '17 at 13:10
  • 1
    Possible duplicate of [How to change the name of the output binary to not be a.out with CMake?](http://stackoverflow.com/questions/30904273/how-to-change-the-name-of-the-output-binary-to-not-be-a-out-with-cmake) – Florian Apr 11 '17 at 13:10

0 Answers0