1

Where can I find an example of how to build a C++20 module using cmake + ninja?

hello.mpp

export module hello;
export int i = 42;

main.cpp:

import hello;

#include <iostream>

int main(){
  std::cout << i;
}

What should I write in CMakeLists.txt to build this? I need a cross platform solution

user16376223
  • 11
  • 1
  • 1
  • Have you searched for your topic before asking the question? If yes, the I wonder how have you missed already existed questions. – Tsyvarev Jul 04 '21 at 10:47

0 Answers0