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

Fix compilation of tests for out-of-tree-build #151

Merged
merged 1 commit into from
Dec 18, 2019

Conversation

bwalle
Copy link

@bwalle bwalle commented Aug 22, 2019

We have to modify the include path, otherwise I get

| libconfig/tests/tests.c:31:10: fatal error: libconfig.h: No such file or directory
| 31 | #include <libconfig.h>
| | ^~~~~~~~~~~~~
| compilation terminated.

Signed-off-by: Bernhard Walle [email protected]

We have to modify the include path, otherwise I get

| libconfig/tests/tests.c:31:10: fatal error: libconfig.h: No such file or directory
|    31 | #include <libconfig.h>
|       |          ^~~~~~~~~~~~~
| compilation terminated.

Signed-off-by: Bernhard Walle <[email protected]>
@@ -4,6 +4,8 @@ else()
set(libname "config")
endif()

include_directories(${CMAKE_SOURCE_DIR}/lib)
Copy link

@KevinWMatthews KevinWMatthews Nov 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples seem to use a different style, setting the include directory per-target:

target_include_directories(libconfig_tests PRIVATE ${CMAKE_SOURCE_DIR}/lib)

@KevinWMatthews
Copy link

KevinWMatthews commented Nov 5, 2019

Can confirm for an out-of-tree build with CMake.
This is noticeable to new users because the tests build by default.

@hyperrealm hyperrealm merged commit 757e233 into hyperrealm:master Dec 18, 2019
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

Successfully merging this pull request may close these issues.

4 participants