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
43ab8a23
Unverified
Commit
43ab8a23
authored
Jul 18, 2020
by
Niels Lohmann
Committed by
GitHub
Jul 18, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2279 from nlohmann/issue1818
Add test for target_include_directories
parents
a10d486e
2fd57d3e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
0 deletions
+36
-0
test/CMakeLists.txt
test/CMakeLists.txt
+1
-0
test/cmake_target_include_directories/CMakeLists.txt
test/cmake_target_include_directories/CMakeLists.txt
+16
-0
test/cmake_target_include_directories/project/CMakeLists.txt
test/cmake_target_include_directories/project/CMakeLists.txt
+11
-0
test/cmake_target_include_directories/project/main.cpp
test/cmake_target_include_directories/project/main.cpp
+8
-0
No files found.
test/CMakeLists.txt
View file @
43ab8a23
...
...
@@ -193,3 +193,4 @@ add_subdirectory(cmake_import)
add_subdirectory
(
cmake_import_minver
)
add_subdirectory
(
cmake_add_subdirectory
)
add_subdirectory
(
cmake_fetch_content
)
add_subdirectory
(
cmake_target_include_directories
)
test/cmake_target_include_directories/CMakeLists.txt
0 → 100644
View file @
43ab8a23
add_test
(
NAME cmake_target_include_directories_configure
COMMAND
${
CMAKE_COMMAND
}
-G
"
${
CMAKE_GENERATOR
}
"
-DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
-Dnlohmann_json_source=
${
PROJECT_SOURCE_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/project
)
add_test
(
NAME cmake_target_include_directories_build
COMMAND
${
CMAKE_COMMAND
}
--build .
)
set_tests_properties
(
cmake_target_include_directories_configure PROPERTIES
FIXTURES_SETUP cmake_target_include_directories
)
set_tests_properties
(
cmake_target_include_directories_build PROPERTIES
FIXTURES_REQUIRED cmake_target_include_directories
)
test/cmake_target_include_directories/project/CMakeLists.txt
0 → 100644
View file @
43ab8a23
cmake_minimum_required
(
VERSION 3.1
)
project
(
DummyImport CXX
)
add_executable
(
with_private_target main.cpp
)
target_include_directories
(
with_private_target PRIVATE
${
nlohmann_json_source
}
/include
)
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
)
test/cmake_target_include_directories/project/main.cpp
0 → 100644
View file @
43ab8a23
#include <nlohmann/json.hpp>
int
main
(
int
argc
,
char
**
argv
)
{
nlohmann
::
json
j
;
return
0
;
}
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