CMake-generated Makefile does not contain target

Eksapsy

I'm using G++ MinGW for compiling. My Files :

main.cpp, linkedList.cpp, linkedList.h

My CMake file :

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
project (Tutorial)
set(CMAKE_CXX_FLAGS "-Wall -std=c++11")
enable_testing()

include_directories(include)
add_executable(Tutorial 
main.cpp
linkedList.cpp
linkedList.h
)

add_test(Tutorial tutorial)

The exact compile error from generated Makefile :

mingw32-make[2]: *** No rule to make target '../linkedList.h', needed by 'CMakeFiles/Tutorial.dir/main.cpp.obj'.  Stop.
mingw32-make[1]: *** [CMakeFiles/Tutorial.dir/all] Error 2
mingw32-make: *** [all] Error 2

Gist for CMake generated Makefile

usr1234567

You target is Tutorial, not ../LinkedList.h

Go to your build directory and execute

make Tutorial

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

CMake generated makefile does not expand all `make` variables

From Dev

Is it possible to change the name of generated makefile in CMake?

From Dev

CMake dependency target does not exist

From Dev

What does this strange Makefile target ".PHONY" mean?

From Dev

How to include a cmake Makefile after a target has been executed?

From Dev

cmake: generated header in subdir A needed transitively by target in subdir B

From Dev

What does --target option mean in CMake?

From Dev

Makefile target references Makefile

From Dev

generated jar file does not contain $1 class file

From Dev

How to test if a link target is a pdf file if the link does not contain .pdf

From Dev

Css target element which does not contain the same element

From Dev

cmake error 'the source does not appear to contain CMakeLists.txt'

From Dev

Why does this makefile target specific variable not expand as expected?

From Dev

What does the target ".cpp.o:" mean in a Makefile?

From Dev

`cd` does not actually go into directory within a Makefile target

From Dev

Why does cmake not add a library link command in the makefile?

From Dev

Does cmake have something like target_link_options?

From Dev

add_custom_target does not appear to properly expand variable in cmake

From Dev

Error in connecting CMake to FreeBASIC compiler. CMake Error: The source directory does not appear to contain CMakeLists.txt

From Dev

Auto generated makefile command

From Dev

Makefile set variable in target

From Dev

Alias target name in Makefile

From Dev

Makefile generic target rule

From Dev

Target name in Makefile prerequisite

From Dev

Dynamic Makefile target

From Dev

Makefile target color output

From Dev

Directory independent target in Makefile

From Dev

Makefile remaking directory target

From Dev

Makefile Automatic Target Generation

Related Related

  1. 1

    CMake generated makefile does not expand all `make` variables

  2. 2

    Is it possible to change the name of generated makefile in CMake?

  3. 3

    CMake dependency target does not exist

  4. 4

    What does this strange Makefile target ".PHONY" mean?

  5. 5

    How to include a cmake Makefile after a target has been executed?

  6. 6

    cmake: generated header in subdir A needed transitively by target in subdir B

  7. 7

    What does --target option mean in CMake?

  8. 8

    Makefile target references Makefile

  9. 9

    generated jar file does not contain $1 class file

  10. 10

    How to test if a link target is a pdf file if the link does not contain .pdf

  11. 11

    Css target element which does not contain the same element

  12. 12

    cmake error 'the source does not appear to contain CMakeLists.txt'

  13. 13

    Why does this makefile target specific variable not expand as expected?

  14. 14

    What does the target ".cpp.o:" mean in a Makefile?

  15. 15

    `cd` does not actually go into directory within a Makefile target

  16. 16

    Why does cmake not add a library link command in the makefile?

  17. 17

    Does cmake have something like target_link_options?

  18. 18

    add_custom_target does not appear to properly expand variable in cmake

  19. 19

    Error in connecting CMake to FreeBASIC compiler. CMake Error: The source directory does not appear to contain CMakeLists.txt

  20. 20

    Auto generated makefile command

  21. 21

    Makefile set variable in target

  22. 22

    Alias target name in Makefile

  23. 23

    Makefile generic target rule

  24. 24

    Target name in Makefile prerequisite

  25. 25

    Dynamic Makefile target

  26. 26

    Makefile target color output

  27. 27

    Directory independent target in Makefile

  28. 28

    Makefile remaking directory target

  29. 29

    Makefile Automatic Target Generation

HotTag

Archive