Flag -l
is for linker, not for compiler. This flag is used for link with libraries. CMake has special command target_link_libraries for that purpose:
target_link_libraries(day_g pq)
More Related Contents:
- How to enable C++11 in CLion?
- CMake error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found
- How do I make CMake output into a ‘bin’ dir?
- CMake: How to set up source, library and CMakeLists.txt dependencies?
- How to detect C++11 support of a compiler with CMake
- Modern way to set compiler flags in cross-platform cmake project
- OS specific instructions in CMAKE: How to?
- How do I add a library path in cmake?
- Change default value of CMAKE_CXX_FLAGS_DEBUG and friends in CMake
- How to create a shared library with cmake?
- CMake output/build directory
- CMake: include library dependencies in a static library
- CMake linking against shared library on windows: error about not finding .lib file
- CPack: Exclude INSTALL commands from subdirectory (googletest directory)
- How do I use CMake?
- CMake does not find Visual C++ compiler
- CMake ExternalProject_Add() and FindPackage()
- In CMake, how can I test if the compiler is Clang?
- How to Use CCache with CMake?
- CMake – remove a compile flag for a single translation unit
- How to use c++20 modules with CMake?
- cmake include header into every source file
- How to build cmake ExternalProject while configurating main one?
- CMake Error: “add_subdirectory not given a binary directory”
- How do I iterate over all CMake targets programmatically?
- What is the difference between include_directories and target_include_directories in CMake?
- How to use CMAKE_EXPORT_COMPILE_COMMANDS?
- The proper way of forcing a 32-bit compile using CMake
- Adding multiple executables in CMake
- CMake: target_include_directories() prints an error when I try to add the source directory itself, or one of its subdirectories