src/CMakeLists.txt
branchv_0
changeset 3 0d857519a4c9
parent 2 7ba3ae8cf1fc
child 4 1622c087f3ea
equal deleted inserted replaced
2:7ba3ae8cf1fc 3:0d857519a4c9
     1 set(EXECUTABLE_FILE "relpipe-out-chart")
     1 set(EXECUTABLE_FILE "relpipe-out-chart")
       
     2 
       
     3 # Qt:
       
     4 set(CMAKE_INCLUDE_CURRENT_DIR ON) # Find includes in corresponding build directories
       
     5 set(CMAKE_AUTOMOC ON) # Instruct CMake to run moc automatically when needed
       
     6 set(CMAKE_AUTOUIC ON) # Create code from a list of Qt designer ui files
       
     7 find_package(Qt5Widgets CONFIG REQUIRED) # Find the QtWidgets library
     2 
     8 
     3 # Add ASan AddressSanitizer
     9 # Add ASan AddressSanitizer
     4 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
    10 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
     5 set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
    11 set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
     6 # From ASan wiki: "To get nicer stack traces in error messages add -fno-omit-frame-pointer."
    12 # From ASan wiki: "To get nicer stack traces in error messages add -fno-omit-frame-pointer."
    11 link_directories(${RELPIPE_LIB_READER_LIBRARY_DIRS})
    17 link_directories(${RELPIPE_LIB_READER_LIBRARY_DIRS})
    12 
    18 
    13 add_executable (${EXECUTABLE_FILE} relpipe-out-chart.cpp)
    19 add_executable (${EXECUTABLE_FILE} relpipe-out-chart.cpp)
    14 
    20 
    15 target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIB_READER_LIBRARIES})
    21 target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIB_READER_LIBRARIES})
       
    22 target_link_libraries(${EXECUTABLE_FILE} Qt5::Widgets)