Apply cmake-format and clang-format
This commit is contained in:
parent
2b6634d574
commit
6252a7335a
|
@ -34,8 +34,8 @@ public:
|
||||||
~CodeFactory();
|
~CodeFactory();
|
||||||
|
|
||||||
const std::vector<std::unique_ptr<CodeGenerator>> &generators() const;
|
const std::vector<std::unique_ptr<CodeGenerator>> &generators() const;
|
||||||
template <typename GeneratorType, typename... Args> void addGenerator(Args &&... args);
|
template <typename GeneratorType, typename... Args> void addGenerator(Args &&...args);
|
||||||
template <typename GeneratorType, typename... Args> auto bindGenerator(Args &&... args);
|
template <typename GeneratorType, typename... Args> auto bindGenerator(Args &&...args);
|
||||||
|
|
||||||
bool run();
|
bool run();
|
||||||
clang::CompilerInstance *compilerInstance();
|
clang::CompilerInstance *compilerInstance();
|
||||||
|
@ -64,7 +64,7 @@ private:
|
||||||
* \brief Instantiates a code generator of the specified type and adds it to the current instance.
|
* \brief Instantiates a code generator of the specified type and adds it to the current instance.
|
||||||
* \remarks The specified \a args are forwarded to the generator's constructor.
|
* \remarks The specified \a args are forwarded to the generator's constructor.
|
||||||
*/
|
*/
|
||||||
template <typename GeneratorType, typename... Args> void CodeFactory::addGenerator(Args &&... args)
|
template <typename GeneratorType, typename... Args> void CodeFactory::addGenerator(Args &&...args)
|
||||||
{
|
{
|
||||||
m_generators.emplace_back(std::make_unique<GeneratorType>(*this, std::forward<Args>(args)...));
|
m_generators.emplace_back(std::make_unique<GeneratorType>(*this, std::forward<Args>(args)...));
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ template <typename T> T &&wrapReferences(T &&val)
|
||||||
* - The specified \a args are forwarded to the generator's constructor.
|
* - The specified \a args are forwarded to the generator's constructor.
|
||||||
* - No copy of \a args passed by reference is made.
|
* - No copy of \a args passed by reference is made.
|
||||||
*/
|
*/
|
||||||
template <typename GeneratorType, typename... Args> auto CodeFactory::bindGenerator(Args &&... args)
|
template <typename GeneratorType, typename... Args> auto CodeFactory::bindGenerator(Args &&...args)
|
||||||
{
|
{
|
||||||
return std::bind(&CodeFactory::addGenerator<GeneratorType, Args...>, this, Detail::wrapReferences(std::forward<Args>(args)...));
|
return std::bind(&CodeFactory::addGenerator<GeneratorType, Args...>, this, Detail::wrapReferences(std::forward<Args>(args)...));
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,8 +46,8 @@ if (NOT REFLECTION_GENERATOR_CLANG_RESOURCE_DIR)
|
||||||
endif ()
|
endif ()
|
||||||
exec_program(
|
exec_program(
|
||||||
${REFLECTION_GENERATOR_CLANG_BIN} ARGS
|
${REFLECTION_GENERATOR_CLANG_BIN} ARGS
|
||||||
-print-resource-dir OUTPUT_VARIABLE
|
-print-resource-dir
|
||||||
REFLECTION_GENERATOR_CLANG_RESOURCE_DIR)
|
OUTPUT_VARIABLE REFLECTION_GENERATOR_CLANG_RESOURCE_DIR)
|
||||||
endif ()
|
endif ()
|
||||||
if (NOT REFLECTION_GENERATOR_CLANG_RESOURCE_DIR OR NOT IS_DIRECTORY "${REFLECTION_GENERATOR_CLANG_RESOURCE_DIR}")
|
if (NOT REFLECTION_GENERATOR_CLANG_RESOURCE_DIR OR NOT IS_DIRECTORY "${REFLECTION_GENERATOR_CLANG_RESOURCE_DIR}")
|
||||||
message(
|
message(
|
||||||
|
|
Loading…
Reference in New Issue