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

configure test only does not work if CPM_USE_LOCAL_PACKAGES is TRUE #166

Open ClausKlein opened 1 year ago

ClausKlein commented 1 year ago
Claus-iMac:ModernCppStarter clausklein$ cmake -S test -B ./cmake-build-ModernCppStarter-x86_64-Debug/test -G Ninja -D CMAKE_CXX_COMPILER_LAUNCHER=/usr/local/bin/ccache -D CMAKE_EXPORT_COMPILE_COMMANDS=1 -D CMAKE_BUILD_TYPE=Debug -D CMAKE_PREFIX_PATH=/Users/clausklein/Workspace/cpp/stagedir -D BUILD_TESTING=1 -D CMAKE_CXX_STANDARD=20 -DBUILD_SHARED_LIBS=NO -Wdev -Wdeprecated
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Downloading CPM.cmake to /Users/clausklein/Workspace/cpp/ModernCppStarter/cmake-build-ModernCppStarter-x86_64-Debug/test/cmake/CPM_0.37.0.cmake
-- CPM: Using local package doctest@2.4.9
-- CPM: Adding package Format.cmake@1.7.3 (v1.7.3)
-- Found Python: /usr/local/Frameworks/Python.framework/Versions/3.11/bin/python3.11 (found version "3.11.1") found components: Interpreter 
-- Format.cmake: clang-format and/or python not found, adding dummy targets
-- CPM: Using local package Greeter@1.0
CMake Error at CMakeLists.txt:37 (target_compile_options):
  Cannot specify compile options for target "Greeter" which is not built by
  this project.

CMake Error at CMakeLists.txt:52 (include):
  include could not find requested file:

    /scripts/cmake/doctest.cmake

CMake Error at CMakeLists.txt:53 (doctest_discover_tests):
  Unknown CMake command "doctest_discover_tests".

-- Configuring incomplete, errors occurred!
See also "/Users/clausklein/Workspace/cpp/ModernCppStarter/cmake-build-ModernCppStarter-x86_64-Debug/test/CMakeFiles/CMakeOutput.log".
See also "/Users/clausklein/Workspace/cpp/ModernCppStarter/cmake-build-ModernCppStarter-x86_64-Debug/test/CMakeFiles/CMakeError.log".
Claus-iMac:ModernCppStarter clausklein$ git log -2
commit 84ed75ca7db28672a29d865382389ad3e0f03f8a (HEAD -> master, origin/master, origin/HEAD)
Author: Lars Melchior <TheLartians@users.noreply.github.com>
Date:   Fri Feb 3 18:38:14 2023 +0100

    Update CPM.cmake (#164)

commit ab5c08abed71ac2d43723a91cebc1588e68df250
Author: Lars Melchior <TheLartians@users.noreply.github.com>
Date:   Fri Feb 3 18:31:28 2023 +0100

    Update fmt and doctest (#163)

    * update dependencies

    * update cache version used

    * update checkout version used
Claus-iMac:ModernCppStarter clausklein$ git status -s -b
## master...remotes/origin/master
?? cmake-build-ModernCppStarter-x86_64-Debug/
Claus-iMac:ModernCppStarter clausklein$