Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ add_library(${PROJECT_NAME}
src/cxx-ipr-io.cxx
src/cxx-ipr-traversal.cxx
src/input.cxx
src/utility.cxx
src/cxx-ipr.cxx
)

Expand All @@ -42,6 +41,7 @@ target_sources(${PROJECT_NAME}
src/cxx-ipr.ixx
src/cxx-ipr-traversal.ixx
src/cxx-ipr-io.ixx
src/cxx-ipr-impl.ixx
)

target_include_directories(${PROJECT_NAME}
Expand All @@ -51,10 +51,8 @@ target_include_directories(${PROJECT_NAME}

target_sources(${PROJECT_NAME}
PRIVATE
${PROJECT_SOURCE_DIR}/include/ipr/impl
${PROJECT_SOURCE_DIR}/include/ipr/lexer
${PROJECT_SOURCE_DIR}/include/ipr/node-category
${PROJECT_SOURCE_DIR}/include/ipr/utility-impl
${PROJECT_SOURCE_DIR}/include/ipr/input
${PROJECT_SOURCE_DIR}/3rdparty/doctest/doctest.h
)
Expand Down
17 changes: 7 additions & 10 deletions include/ipr/std-preamble
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@
// Written by Gabriel Dos Reis.
// See LICENSE for copyright and license notices.
//
// Standard library preamble for translation units that use `import cxx.ipr;`
// followed by `#include <ipr/impl>` (or other IPR project headers).
// Standard library preamble for IPR module interface and implementation units.
// This header is included in the global module fragment of IPR .ixx and .cxx
// files to ensure standard library headers are available before the module
// purview begins.
//
// TEMPORARY: This header exists because the implementation layer (<ipr/impl>)
// is not yet modularized. MSVC requires all standard #includes to appear
// before `import cxx.ipr;` to avoid redefinition errors. Once <ipr/impl>
// becomes a module, this preamble is no longer needed.
//
// Usage:
// Usage (in a module interface or implementation unit):
// module;
// #include <ipr/std-preamble>
// import cxx.ipr;
// #include <ipr/impl>
// export module cxx.ipr.impl; // or: module cxx.ipr.impl;

#ifndef IPR_STD_PREAMBLE_INCLUDED
#define IPR_STD_PREAMBLE_INCLUDED
Expand Down
Loading
Loading