Git Product home page Git Product logo

cmake-project-template's Issues

Manuel build: Missing CMakeLists.txt in /test/lib/googletest and fails to link gtest

Using a fresh clone (e3ad4b6) the manual build fails on my system (MacOS 10.15).

In /Users/lauenburg/Projects/cmake-project-template/test/lib/googletest running:

rm -rf build && mkdir build
git submodule init && git submodule update
cd build
cmake ..

Leads to the following error, telling me that cmake-project-template/test/lib/googletest needs to contain a CMakeLists.txt file:

-- Detecting CXX compile features - done
CMake Error at test/CMakeLists.txt:4 (add_subdirectory):
  The source directory

    /Users/lauenburg/Projects/cmake-project-template/test/lib/googletest

  does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!

When adding an empty CMakeLists.txt file to cmake-project-template/test/lib/googletest cmake complets succesfully.

But if I then run make && make install make fails as it can not find google test:

/Users/lauenburg/Projects/cmake-project-template/test/main.cpp:1:10: fatal error: 'gtest/gtest.h' file not found
#include "gtest/gtest.h"
         ^~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [test/CMakeFiles/divider_tests.dir/main.cpp.o] Error 1
make[1]: *** [test/CMakeFiles/divider_tests.dir/all] Error 2
make: *** [all] Error 2

I installed and tested google-test on my machine and it works perfectly. Is there something that I am missing?

CLion doesn't have Run -> Install option

Maybe I'm just stupid and looking into the wrong menu, but the README.md says the following:

Select menu option Run ➜ Build, and then Run ➜ Install.

However, those are the only options shown when I open the project for the first time:

Screen Shot 2019-04-17 at 6 35 57 PM

I got the application running after some clicking around, so I just wanted to give a heads up and suggest to change this part of the readme.

Manual build instructions skip submodule step

Using a fresh clone of 8c583ca the manual steps don't work:

$ mkdir build && cd build && cmake ..
CMake Error at test/CMakeLists.txt:4 (add_subdirectory):
  The source directory
    /home/nick/dev/libz32/test/lib/googletest
  does not contain a CMakeLists.txt file.
-- Configuring incomplete, errors occurred!
See also "/home/nick/dev/libz32/CMakeFiles/CMakeOutput.log".

Looking a the build-and-run script it's missing the submodule checkout step for the googletest library:

run "git submodule init && git submodule update"

Will make a PR in a sec.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.