Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required(VERSION 3.1)
- file(WRITE foo.cpp [[
- void bar();
- int main()
- {
- bar();
- }
- ]])
- add_executable(foo foo.cpp)
- file(WRITE bar.cpp [[
- #include <iostream>
- void bar()
- {
- std::cout << "bar" << std::endl;
- }
- ]])
- target_sources(foo PRIVATE bar.cpp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement