-1

We have an old compilation script in Makefile and would like to start using CMake. Does anyone perhaps know what would be the equivalent of -I from Makefile in CMake?

This is the concrete line: "-I gem5-stable/util/m5 gem5-stable/util/m5/m5op_x86.S"

xTrmwYs
  • 43
  • 1
  • 9
  • This is a trivial question. First you have to understand what `-l` option does. Search `"-l" compiler option`. Then you search `link cmake`. And the first result is [`target_link_libraries`](https://cmake.org/cmake/help/latest/command/target_link_libraries.html). – Antonio Oct 24 '16 at 12:15
  • Sorry, but it wasn't trivial to me. – xTrmwYs Oct 25 '16 at 10:29
  • Excuse me Antonio, but your comments are unrelated and not constructive. – xTrmwYs Dec 05 '16 at 08:56
  • Undeniably: it has been removed by a moderator. I was just showing how you could have solved the problem by yourself, with a correct use of google search. – Antonio Dec 05 '16 at 14:04

1 Answers1

2

It would help to see your actual CMake file, but you may want to take a look at target_link_libraries.

rocambille
  • 15,398
  • 12
  • 50
  • 68
  • Thank you. In the combination with http://stackoverflow.com/questions/19478088/cmake-link-library-target-link-error I got exactly I wanted. – xTrmwYs Oct 25 '16 at 10:28