0

I have a CMakeLists.txt for my project. There are a few lines I want to exclude into a new seperate .txt-file. Is there a command in cmake-language that refers to a .txt-file as input? (like \input in Latex)

Thank you!

Dnk8000
  • 3
  • 3
  • @Botje thank you for the suggestion! Honestly I struggle with fully understanding the thread since I have barely any experience with cmake. So if I replace some lines in my CMakeLists.txt with `find_package(Module)` and add the file "FindModule.cmake" containing those lines, could that be a solution? – Dnk8000 Jul 30 '21 at 13:39
  • ...no. You should just `include("${CMAKE_CURRENT_SOURCE_DIR}/foo.txt")` – Botje Jul 30 '21 at 13:40

0 Answers0