0

I have a source code that interfaces with LAMMPS. For the reasons that are beyond the scope of this forum, however, I have to maintain two working versions of my code, each compatible with a different version of LAMMPS. Therefore, I need to compile two libraries from the same code: each having been compiled against the corresponding LAMMPS source code. How can I do that in CMake?

So the question is, say you have the source code a1.cpp, a2.cpp, ...., aN.cpp. All these sources codes include code from another package. But I want to use different include paths for each round of compilation.

Zulu
  • 8,765
  • 9
  • 49
  • 56

1 Answers1

1

You can use target_include_directories() and target_link_libraries() to define a per-target lib include/linking.

maddouri
  • 3,737
  • 5
  • 29
  • 51