TheLartians / ModernCppStarter

🚀 Kick-start your C++! A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management and much more.
https://thelartians.github.io/ModernCppStarter
The Unlicense
4.33k stars 381 forks source link

CMake Error at ../CMakeLists.txt:47 (add_library): #129

Closed Marco-Israel closed 3 years ago

Marco-Israel commented 3 years ago

After rename Greeter in global and test CMakeList.txt I cant build it anymore.

CMake Error at ../CMakeLists.txt:47 (add_library):

Produced in test/CmakeList.txt

_if(TEST_INSTALLED_VERSION)
... else()
..
CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LISTDIR}/..)
.. endif()

TheLartians commented 3 years ago

Hey @Marco-Israel, thanks for opening the issue! As outlined in the Usage section of the readme, you need to replace all occurrences of "greeter" in the project, otherwise CMake cannot know which library to link the tests to for the project.