Initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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
|
||||
LABELS not_reproducible
|
||||
)
|
||||
set_tests_properties(cmake_target_include_directories_build PROPERTIES
|
||||
FIXTURES_REQUIRED cmake_target_include_directories
|
||||
LABELS not_reproducible
|
||||
)
|
@@ -0,0 +1,11 @@
|
||||
// __ _____ _____ _____
|
||||
// __| | __| | | | JSON for Modern C++ (supporting code)
|
||||
// | | |__ | | | | | | version 3.11.2
|
||||
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
|
||||
//
|
||||
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "Bar.hpp"
|
||||
|
||||
class Bar;
|
@@ -0,0 +1,12 @@
|
||||
// __ _____ _____ _____
|
||||
// __| | __| | | | JSON for Modern C++ (supporting code)
|
||||
// | | |__ | | | | | | version 3.11.2
|
||||
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
|
||||
//
|
||||
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "Foo.hpp"
|
||||
|
||||
class Bar : public Foo {};
|
@@ -0,0 +1,21 @@
|
||||
cmake_minimum_required(VERSION 3.1...3.14)
|
||||
|
||||
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)
|
||||
|
||||
# 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)
|
@@ -0,0 +1,11 @@
|
||||
// __ _____ _____ _____
|
||||
// __| | __| | | | JSON for Modern C++ (supporting code)
|
||||
// | | |__ | | | | | | version 3.11.2
|
||||
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
|
||||
//
|
||||
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "Foo.hpp"
|
||||
|
||||
class Foo;
|
@@ -0,0 +1,12 @@
|
||||
// __ _____ _____ _____
|
||||
// __| | __| | | | JSON for Modern C++ (supporting code)
|
||||
// | | |__ | | | | | | version 3.11.2
|
||||
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
|
||||
//
|
||||
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
class Foo {};
|
@@ -0,0 +1,16 @@
|
||||
// __ _____ _____ _____
|
||||
// __| | __| | | | JSON for Modern C++ (supporting code)
|
||||
// | | |__ | | | | | | version 3.11.2
|
||||
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
|
||||
//
|
||||
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
nlohmann::json j;
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user