프로젝트
GitHub에서 보기
vitaut/modules
소개
Simple C++20 module support for CMake
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalSimple C++20 module support for CMake
Provides the add_module_library CMake function that is a wrapper around add_library with additional module-specific rules.
This module currently supports:
- Clang 15+
- GCC 11+
- MSVC 19.28+
This module can also fallback to a non-modular library for compatibility.
Projects using add_module_library:
- {fmt}: a modern formatting library
Example
hello.cc:
module;
#include <cstdio>
export module hello;
export void hello() { std::printf("Hello, modules!\n"); }
main.cc:
import hello;
int main() { hello(); }
CMakeLists.txt:
cmake_minimum_required(VERSION 3.11)
project(HELLO CXX)
include(modules.cmake)
add_module_library(hello hello.cc)
add_executable(main main.cc)
target_link_libraries(main hello)
Building with clang:
CXX=clang++ cmake .
make
Running:
$ ./main
Hello, modules!
License
The code is distributed under the permissive MIT license with an optional exception that allows distributing binary code without attribution.
관련 프로젝트 살펴보기
불러오는 중…