如何在CMake中添加“-l”(Ell)编译器标志
g++ main.cpp -lpq
g++
cmake_minimum_required(VERSION 3.5.1)project(day_g)set(CMAKE_CXX_FLAGS "-lpq")add_definitions(-lpq)message("CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}")set(CMAKE_CXX_STANDARD 11)set(SOURCE_FILES main.cpp)add_executable(day_g ${SOURCE_FILES})
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS is -lpq-- Configuring done-- Generating done
守候你守候我
相关分类