Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build inja_test failed. #276

Open
wendajiang opened this issue Aug 17, 2023 · 2 comments
Open

Build inja_test failed. #276

wendajiang opened this issue Aug 17, 2023 · 2 comments

Comments

@wendajiang
Copy link

cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug
cmake --build build -j2

output the

[ 33%] Building CXX object CMakeFiles/inja_test.dir/test/test.cpp.o
[ 33%] Building CXX object CMakeFiles/single_inja_test.dir/test/test.cpp.o
/Users/david/cpp/inja/test/test.cpp:5:10: fatal error: 'doctest/doctest.h' file not found
#include "doctest/doctest.h"
         ^~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[2]: *** [CMakeFiles/inja_test.dir/build.make:76: CMakeFiles/inja_test.dir/test/test.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/inja_test.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
[ 50%] Linking CXX executable single_inja_test
[ 50%] Built target single_inja_test
gmake: *** [Makefile:146: all] Error 2

on Macos, and cmake version is 3.27.2

@pantor
Copy link
Owner

pantor commented Sep 3, 2023

This works for me and is tested on all platforms in CI. Are you sure that the file third_party/include/doctest/doctest.h exists?

@wendajiang
Copy link
Author

wendajiang commented Sep 5, 2023

This works for me and is tested on all platforms in CI. Are you sure that the file third_party/include/doctest/doctest.h exists?

I look up the /CMakeLists.txt and the target inja_test not add the include directory. For comparison, the single_inja_test target have the target_include_directories(single_inja INTERFACE single_include include third_party/include)

And when add this line, it works for me.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants