mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-12 21:56:54 +00:00
tomlplusplus: compile header once
This commit is contained in:
parent
bd919ae4e4
commit
008e519cd7
@ -1,3 +1,8 @@
|
||||
add_library(toml
|
||||
support/Toml.cpp
|
||||
)
|
||||
target_link_libraries(toml PUBLIC tomlplusplus::tomlplusplus)
|
||||
|
||||
add_library(drgn_utils DrgnUtils.cpp)
|
||||
target_link_libraries(drgn_utils
|
||||
glog::glog
|
||||
@ -28,7 +33,7 @@ target_link_libraries(container_info
|
||||
drgn_utils # This shouldn't be needed! Clean up Commoh.h!
|
||||
|
||||
glog::glog
|
||||
tomlplusplus::tomlplusplus
|
||||
toml
|
||||
)
|
||||
|
||||
add_library(codegen
|
||||
|
@ -16,10 +16,11 @@
|
||||
#include "oi/ContainerInfo.h"
|
||||
|
||||
#include <glog/logging.h>
|
||||
#include <toml++/toml.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "oi/support/Toml.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
ContainerTypeEnum containerTypeEnumFromStr(std::string& str) {
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "oi/OIUtils.h"
|
||||
|
||||
#include <glog/logging.h>
|
||||
#include <toml++/toml.h>
|
||||
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
@ -24,6 +23,8 @@
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <filesystem>
|
||||
|
||||
#include "oi/support/Toml.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace OIUtils {
|
||||
|
17
oi/support/Toml.cpp
Normal file
17
oi/support/Toml.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#define TOML_IMPLEMENTATION
|
||||
#include "oi/support/Toml.h"
|
17
oi/support/Toml.h
Normal file
17
oi/support/Toml.h
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#define TOML_HEADER_ONLY 0
|
||||
#include <toml++/toml.h>
|
@ -104,7 +104,7 @@ target_link_libraries(integration_test_runner PRIVATE
|
||||
${GMOCK_MAIN_LIBS}
|
||||
Boost::headers
|
||||
${Boost_LIBRARIES}
|
||||
tomlplusplus::tomlplusplus
|
||||
toml
|
||||
)
|
||||
target_compile_definitions(integration_test_runner PRIVATE
|
||||
TARGET_EXE_PATH="${CMAKE_CURRENT_BINARY_DIR}/integration_test_target"
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include "runner_common.h"
|
||||
|
||||
#include <toml++/toml.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
@ -15,6 +13,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "oi/OIOpts.h"
|
||||
#include "oi/support/Toml.h"
|
||||
|
||||
using namespace std::literals;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user