Skip to content

Commit

Permalink
refactor: move source files to src
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed Jul 11, 2023
1 parent e14fe08 commit 04f75dd
Show file tree
Hide file tree
Showing 123 changed files with 187 additions and 1,039 deletions.
23 changes: 10 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ find_package(fmt REQUIRED CONFIG)

file(
GLOB_RECURSE LIB_SOURCES CONFIGURE_DEPENDS
lib/*.cpp
lib/*.hpp
lib/*.natvis
src/lib/*.cpp
src/lib/*.hpp
src/lib/*.natvis
include/*.hpp
include/*.natvis
SourceFileNames.cpp)
Expand All @@ -128,7 +128,7 @@ target_include_directories(mrdox-core
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
PRIVATE
"${PROJECT_SOURCE_DIR}/lib"
"${PROJECT_SOURCE_DIR}/src"
"${PROJECT_SOURCE_DIR}/include")
target_compile_definitions(
mrdox-core
Expand Down Expand Up @@ -202,7 +202,7 @@ endif ()
#
#-------------------------------------------------

file(GLOB_RECURSE TOOL_SOURCES CONFIGURE_DEPENDS tool/*.cpp tool/*.hpp)
file(GLOB_RECURSE TOOL_SOURCES CONFIGURE_DEPENDS src/tool/*.cpp src/tool/*.hpp)
add_executable(mrdox ${TOOL_SOURCES})
target_compile_definitions(mrdox PRIVATE -DMRDOX_TOOL)

Expand All @@ -212,8 +212,7 @@ target_include_directories(mrdox
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
PRIVATE
"${PROJECT_SOURCE_DIR}/include"
"${PROJECT_SOURCE_DIR}/lib"
"${PROJECT_SOURCE_DIR}/tool"
"${PROJECT_SOURCE_DIR}/src"
)

target_compile_definitions(mrdox PRIVATE -DMRDOX_TOOL)
Expand Down Expand Up @@ -242,21 +241,19 @@ if (MRDOX_BUILD_TESTS)
# Unit tests
#-------------------------------------------------
include(CTest)
file(GLOB_RECURSE TEST_SUITE_FILES CONFIGURE_DEPENDS test/test_suite/*.cpp test/test_suite/*.hpp)
file(GLOB_RECURSE UNIT_TEST_SOURCES CONFIGURE_DEPENDS test/unit/*.cpp test/unit/*.hpp)
file(GLOB_RECURSE TEST_SUITE_FILES CONFIGURE_DEPENDS src/test/test_suite/*.cpp src/test/test_suite/*.hpp)
file(GLOB_RECURSE UNIT_TEST_SOURCES CONFIGURE_DEPENDS src/test/unit/*.cpp src/test/unit/*.hpp)
add_executable(mrdox-test ${TEST_SUITE_FILES} ${UNIT_TEST_SOURCES})
target_include_directories(mrdox-test
PRIVATE
"${PROJECT_SOURCE_DIR}/include"
"${PROJECT_SOURCE_DIR}/lib"
"${PROJECT_SOURCE_DIR}/tool"
"${PROJECT_SOURCE_DIR}/test/test_suite"
"${PROJECT_SOURCE_DIR}/src"
)
target_link_libraries(mrdox-test PUBLIC mrdox-core)
if (MRDOX_CLANG)
target_compile_options(mrdox-test PRIVATE -Wno-covered-switch-default)
endif ()
target_compile_definitions(mrdox-test PRIVATE -DMRDOX_UNIT_TEST_DIR="${CMAKE_CURRENT_SOURCE_DIR}/test/unit")
target_compile_definitions(mrdox-test PRIVATE -DMRDOX_TEST_FILES_DIR="${CMAKE_CURRENT_SOURCE_DIR}/test-files")
add_custom_command(
# if we run tests, we need the addons in the right place.
TARGET mrdox-test
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/-XML/CXXTags.hpp → src/lib/-XML/CXXTags.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_XML_CXXTAGS_HPP
#define MRDOX_TOOL_XML_CXXTAGS_HPP
#ifndef MRDOX_LIB_XML_CXXTAGS_HPP
#define MRDOX_LIB_XML_CXXTAGS_HPP

#include "XMLTags.hpp"
#include <mrdox/Metadata/Function.hpp>
Expand Down
4 changes: 2 additions & 2 deletions lib/-XML/XMLGenerator.cpp → src/lib/-XML/XMLGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#include "XMLGenerator.hpp"
#include "XMLWriter.hpp"
#include "Support/Radix.hpp"
#include "Support/RawOstream.hpp"
#include "lib/Support/Radix.hpp"
#include "lib/Support/RawOstream.hpp"
#include <mrdox/Support/Error.hpp>
#include <mrdox/Metadata.hpp>

Expand Down
4 changes: 2 additions & 2 deletions lib/-XML/XMLGenerator.hpp → src/lib/-XML/XMLGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_XML_XMLGENERATOR_HPP
#define MRDOX_TOOL_XML_XMLGENERATOR_HPP
#ifndef MRDOX_LIB_XML_XMLGENERATOR_HPP
#define MRDOX_LIB_XML_XMLGENERATOR_HPP

#include <mrdox/Platform.hpp>
#include <mrdox/Generator.hpp>
Expand Down
2 changes: 1 addition & 1 deletion lib/-XML/XMLTags.cpp → src/lib/-XML/XMLTags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//

#include "XMLTags.hpp"
#include "Support/Radix.hpp"
#include "lib/Support/Radix.hpp"
#include <mrdox/Platform.hpp>

namespace clang {
Expand Down
4 changes: 2 additions & 2 deletions lib/-XML/XMLTags.hpp → src/lib/-XML/XMLTags.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_XML_XMLTAGS_HPP
#define MRDOX_TOOL_XML_XMLTAGS_HPP
#ifndef MRDOX_LIB_XML_XMLTAGS_HPP
#define MRDOX_LIB_XML_XMLTAGS_HPP

#include <mrdox/Platform.hpp>
#include <mrdox/Metadata/Javadoc.hpp>
Expand Down
8 changes: 4 additions & 4 deletions lib/-XML/XMLWriter.cpp → src/lib/-XML/XMLWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

#include "CXXTags.hpp"
#include "XMLWriter.hpp"
#include "Lib/ConfigImpl.hpp"
#include "Support/Yaml.hpp"
#include "Support/Radix.hpp"
#include "Support/SafeNames.hpp"
#include "lib/Lib/ConfigImpl.hpp"
#include "lib/Support/Yaml.hpp"
#include "lib/Support/Radix.hpp"
#include "lib/Support/SafeNames.hpp"
#include <mrdox/Platform.hpp>
#include <llvm/Support/YAMLParser.h>
#include <llvm/Support/YAMLTraits.h>
Expand Down
6 changes: 3 additions & 3 deletions lib/-XML/XMLWriter.hpp → src/lib/-XML/XMLWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_XML_XMLWRITER_HPP
#define MRDOX_TOOL_XML_XMLWRITER_HPP
#ifndef MRDOX_LIB_XML_XMLWRITER_HPP
#define MRDOX_LIB_XML_XMLWRITER_HPP

#include "XMLTags.hpp"
#include "Support/YamlFwd.hpp"
#include "lib/Support/YamlFwd.hpp"
#include <mrdox/Corpus.hpp>
#include <mrdox/Metadata.hpp>
#include <mrdox/Support/Error.hpp>
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/-adoc/AdocCorpus.hpp → src/lib/-adoc/AdocCorpus.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_ADOC_ADOCCORPUS_HPP
#define MRDOX_TOOL_ADOC_ADOCCORPUS_HPP
#ifndef MRDOX_LIB_ADOC_ADOCCORPUS_HPP
#define MRDOX_LIB_ADOC_ADOCCORPUS_HPP

#include <mrdox/Platform.hpp>
#include <mrdox/Metadata/DomMetadata.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "Builder.hpp"
#include "MultiPageVisitor.hpp"
#include "SinglePageVisitor.hpp"
#include "Support/SafeNames.hpp"
#include "lib/Support/SafeNames.hpp"
#include <mrdox/Metadata/DomMetadata.hpp>
#include <mrdox/Support/Error.hpp>
#include <mrdox/Support/Path.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_ADOC_ADOCGENERATOR_HPP
#define MRDOX_TOOL_ADOC_ADOCGENERATOR_HPP
#ifndef MRDOX_LIB_ADOC_ADOCGENERATOR_HPP
#define MRDOX_LIB_ADOC_ADOCGENERATOR_HPP

#include <mrdox/Platform.hpp>
#include <mrdox/Generator.hpp>
Expand Down
2 changes: 1 addition & 1 deletion lib/-adoc/Builder.cpp → src/lib/-adoc/Builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//

#include "Builder.hpp"
#include "Support/Radix.hpp"
#include "lib/Support/Radix.hpp"
#include <mrdox/Metadata/DomMetadata.hpp>
#include <mrdox/Support/Path.hpp>
#include <llvm/Support/FileSystem.h>
Expand Down
2 changes: 1 addition & 1 deletion lib/-adoc/Builder.hpp → src/lib/-adoc/Builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define MRDOX_LIB_ADOC_BUILDER_HPP

#include "Options.hpp"
#include "Support/Radix.hpp"
#include "lib/Support/Radix.hpp"
#include <mrdox/Metadata/DomMetadata.hpp>
#include <mrdox/Support/Error.hpp>
#include <mrdox/Support/JavaScript.hpp>
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/-adoc/Options.cpp → src/lib/-adoc/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//

#include "Options.hpp"
#include "Support/Yaml.hpp"
#include "Lib/ConfigImpl.hpp" // VFALCO This is a problem
#include "lib/Support/Yaml.hpp"
#include "lib/Lib/ConfigImpl.hpp" // VFALCO This is a problem
#include <mrdox/Corpus.hpp>
#include <mrdox/Support/Path.hpp>
#include <llvm/Support/YAMLParser.h>
Expand Down
4 changes: 2 additions & 2 deletions lib/-adoc/Options.hpp → src/lib/-adoc/Options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_ADOC_OPTIONS_HPP
#define MRDOX_TOOL_ADOC_OPTIONS_HPP
#ifndef MRDOX_LIB_ADOC_OPTIONS_HPP
#define MRDOX_LIB_ADOC_OPTIONS_HPP

#include <mrdox/Support/Error.hpp>
#include <string>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
//

#include "BitcodeGenerator.hpp"
#include "Support/Error.hpp"
#include "Support/SafeNames.hpp"
#include "AST/Bitcode.hpp"
#include "lib/Support/Error.hpp"
#include "lib/Support/SafeNames.hpp"
#include "lib/AST/Bitcode.hpp"
#include <mrdox/Support/ThreadPool.hpp>
#include <mrdox/Metadata.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_BITCODE_BITCODEGENERATOR_HPP
#define MRDOX_TOOL_BITCODE_BITCODEGENERATOR_HPP
#ifndef MRDOX_LIB_BITCODE_BITCODEGENERATOR_HPP
#define MRDOX_LIB_BITCODE_BITCODEGENERATOR_HPP

#include <mrdox/Platform.hpp>
#include <mrdox/Generator.hpp>
Expand Down
6 changes: 3 additions & 3 deletions lib/AST/ASTVisitor.cpp → src/lib/AST/ASTVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include "ASTVisitorHelpers.hpp"
#include "Bitcode.hpp"
#include "ParseJavadoc.hpp"
#include "Support/Path.hpp"
#include "Support/Debug.hpp"
#include "Lib/Diagnostics.hpp"
#include "lib/Support/Path.hpp"
#include "lib/Support/Debug.hpp"
#include "lib/Lib/Diagnostics.hpp"
#include <mrdox/Metadata.hpp>
#include <clang/AST/AST.h>
#include <clang/AST/Attr.h>
Expand Down
8 changes: 4 additions & 4 deletions lib/AST/ASTVisitor.hpp → src/lib/AST/ASTVisitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_AST_ASTVISITOR_HPP
#define MRDOX_TOOL_AST_ASTVISITOR_HPP
#ifndef MRDOX_LIB_AST_ASTVISITOR_HPP
#define MRDOX_LIB_AST_ASTVISITOR_HPP

#include "Lib/ConfigImpl.hpp"
#include "Lib/ExecutionContext.hpp"
#include "lib/Lib/ConfigImpl.hpp"
#include "lib/Lib/ExecutionContext.hpp"
#include <mrdox/Platform.hpp>
#include <clang/Tooling/Execution.h>
#include <clang/Tooling/Tooling.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_AST_ASTVISITORHELPERS_HPP
#define MRDOX_TOOL_AST_ASTVISITORHELPERS_HPP
#ifndef MRDOX_LIB_AST_ASTVISITORHELPERS_HPP
#define MRDOX_LIB_AST_ASTVISITORHELPERS_HPP

#include <mrdox/Platform.hpp>
#include <mrdox/Metadata.hpp>
Expand Down
8 changes: 4 additions & 4 deletions lib/AST/AnyBlock.hpp → src/lib/AST/AnyBlock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_AST_ANYBLOCK_HPP
#define MRDOX_TOOL_AST_ANYBLOCK_HPP
#ifndef MRDOX_LIB_AST_ANYBLOCK_HPP
#define MRDOX_LIB_AST_ANYBLOCK_HPP

#include "BitcodeReader.hpp"
#include "DecodeRecord.hpp"
#include "Support/Debug.hpp"
#include "Support/Error.hpp"
#include "lib/Support/Debug.hpp"
#include "lib/Support/Error.hpp"

namespace clang {
namespace mrdox {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/AST/Bitcode.hpp → src/lib/AST/Bitcode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_AST_BITCODE_HPP
#define MRDOX_TOOL_AST_BITCODE_HPP
#ifndef MRDOX_LIB_AST_BITCODE_HPP
#define MRDOX_LIB_AST_BITCODE_HPP

#include <mrdox/Platform.hpp>
#include <mrdox/MetadataFwd.hpp>
Expand Down
4 changes: 2 additions & 2 deletions lib/AST/BitcodeIDs.hpp → src/lib/AST/BitcodeIDs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_AST_BITCODEIDS_HPP
#define MRDOX_TOOL_AST_BITCODEIDS_HPP
#ifndef MRDOX_LIB_AST_BITCODEIDS_HPP
#define MRDOX_LIB_AST_BITCODEIDS_HPP

#include <mrdox/Platform.hpp>
#include <llvm/Bitstream/BitCodeEnums.h>
Expand Down
4 changes: 2 additions & 2 deletions lib/AST/BitcodeReader.cpp → src/lib/AST/BitcodeReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "BitcodeReader.hpp"
#include "AnyBlock.hpp"
#include "DecodeRecord.hpp"
#include "Support/Debug.hpp"
#include "Support/Error.hpp"
#include "lib/Support/Debug.hpp"
#include "lib/Support/Error.hpp"
#include <mrdox/Support/Error.hpp>

namespace clang {
Expand Down
4 changes: 2 additions & 2 deletions lib/AST/BitcodeReader.hpp → src/lib/AST/BitcodeReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_AST_BITCODEREADER_HPP
#define MRDOX_TOOL_AST_BITCODEREADER_HPP
#ifndef MRDOX_LIB_AST_BITCODEREADER_HPP
#define MRDOX_LIB_AST_BITCODEREADER_HPP

//
// This file implements a reader for parsing the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "BitcodeWriter.hpp"
#include "Bitcode.hpp"
#include "ParseJavadoc.hpp"
#include "Support/Debug.hpp"
#include "lib/Support/Debug.hpp"
#include <mrdox/Metadata.hpp>
#include <llvm/ADT/IndexedMap.h>
#include <initializer_list>
Expand Down
4 changes: 2 additions & 2 deletions lib/AST/BitcodeWriter.hpp → src/lib/AST/BitcodeWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_AST_BITCODEWRITER_HPP
#define MRDOX_TOOL_AST_BITCODEWRITER_HPP
#ifndef MRDOX_LIB_AST_BITCODEWRITER_HPP
#define MRDOX_LIB_AST_BITCODEWRITER_HPP

//
// This file implements a writer for serializing the
Expand Down
4 changes: 2 additions & 2 deletions lib/AST/DecodeRecord.hpp → src/lib/AST/DecodeRecord.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_AST_DECODERECORD_HPP
#define MRDOX_TOOL_AST_DECODERECORD_HPP
#ifndef MRDOX_LIB_AST_DECODERECORD_HPP
#define MRDOX_LIB_AST_DECODERECORD_HPP

#include "BitcodeReader.hpp"

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions lib/AST/ParseJavadoc.hpp → src/lib/AST/ParseJavadoc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
// Official repository: https://github.com/cppalliance/mrdox
//

#ifndef MRDOX_TOOL_AST_PARSEJAVADOC_HPP
#define MRDOX_TOOL_AST_PARSEJAVADOC_HPP
#ifndef MRDOX_LIB_AST_PARSEJAVADOC_HPP
#define MRDOX_LIB_AST_PARSEJAVADOC_HPP

#include "Lib/Diagnostics.hpp"
#include "lib/Lib/Diagnostics.hpp"
#include <mrdox/Platform.hpp>
#include <mrdox/Config.hpp>
#include <mrdox/Metadata/Javadoc.hpp>
Expand Down
Loading

0 comments on commit 04f75dd

Please sign in to comment.