Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
43e07bb9
Unverified
Commit
43e07bb9
authored
Jul 23, 2020
by
Niels Lohmann
Committed by
GitHub
Jul 23, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2301 from nlohmann/regression2281
Add test with multiple translation units
parents
a048b72f
a6d112ff
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
0 deletions
+24
-0
test/cmake_target_include_directories/project/Bar.cpp
test/cmake_target_include_directories/project/Bar.cpp
+3
-0
test/cmake_target_include_directories/project/Bar.hpp
test/cmake_target_include_directories/project/Bar.hpp
+4
-0
test/cmake_target_include_directories/project/CMakeLists.txt
test/cmake_target_include_directories/project/CMakeLists.txt
+10
-0
test/cmake_target_include_directories/project/Foo.cpp
test/cmake_target_include_directories/project/Foo.cpp
+3
-0
test/cmake_target_include_directories/project/Foo.hpp
test/cmake_target_include_directories/project/Foo.hpp
+4
-0
No files found.
test/cmake_target_include_directories/project/Bar.cpp
0 → 100644
View file @
43e07bb9
#include "Bar.hpp"
class
Bar
;
test/cmake_target_include_directories/project/Bar.hpp
0 → 100644
View file @
43e07bb9
#include <nlohmann/json.hpp>
#include "Foo.hpp"
class
Bar
:
public
Foo
{};
test/cmake_target_include_directories/project/CMakeLists.txt
View file @
43e07bb9
...
...
@@ -9,3 +9,13 @@ set_target_properties(with_private_target PROPERTIES CXX_STANDARD 11)
add_executable
(
with_private_system_target main.cpp
)
target_include_directories
(
with_private_system_target PRIVATE SYSTEM
${
nlohmann_json_source
}
/include
)
set_target_properties
(
with_private_system_target PROPERTIES CXX_STANDARD 11
)
# regression from https://github.com/nlohmann/json/discussions/2281
add_library
(
Foo STATIC Foo.cpp Bar.cpp
)
target_include_directories
(
Foo PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
${
nlohmann_json_source
}
/include
)
set_target_properties
(
Foo PROPERTIES CXX_STANDARD 11
)
add_library
(
Bar STATIC Bar.cpp
)
target_link_libraries
(
Bar PRIVATE Foo
)
target_include_directories
(
Bar PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
${
nlohmann_json_source
}
/include
)
set_target_properties
(
Bar PROPERTIES CXX_STANDARD 11
)
test/cmake_target_include_directories/project/Foo.cpp
0 → 100644
View file @
43e07bb9
#include "Foo.hpp"
class
Foo
;
test/cmake_target_include_directories/project/Foo.hpp
0 → 100644
View file @
43e07bb9
#pragma once
#include <nlohmann/json.hpp>
class
Foo
{};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment