cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # if CMAKE_BUILD_TYPE is specified use it; otherwise set the default # build type to "RelWithDebInfo" ("-O2 -g" with gcc) prior to calling # project() if(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type") else(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose build type") endif(DEFINED CMAKE_BUILD_TYPE) project(motorgraph CXX) set(CMAKE_CXX_FLAGS "-Wall") list(APPEND LINK_LIBRARIES) include_directories(../geom) set(SRC_MOTORGRAPH motorgraph.cpp) add_executable(motorgraph ${SRC_MOTORGRAPH} main_motorgraph.cpp) target_link_libraries(motorgraph ${LINK_LIBRARIES})