cmake with CDT4 eclipse generator to generate unix makefiles
NickName:marc Ask DateTime:2014-12-23T03:39:12

cmake with CDT4 eclipse generator to generate unix makefiles

cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE -D_ECLIPSE_VERSION=4.5 -DCMAKE_SYSTEM_NAME=Windows -DPROJECT_SOURCE_DIR=C:/Projects/tracker ../tracker (unix style path. This is the path where the cmake list files are located)

The above is being used to generate a makefile for a Cygwin environment along with an eclipse project. I am using Eclipse mars on windows 7 with cygwin. The project sets up the debugger with gdb.

Name of the project is "Tracker".

Now in the project browser pane in Eclipse, upon expanding the project name ->[Targets]->[exe]Tracker -> Source files.

    The file icons have an exclamation on them. It turns out that on right-click->properties, the file's location is listed as 

C:\cygdrive\c\Projects\tracker\hello.cpp - (does not exist)

Since I used the Cmake CDT4 eclipse generator for cygwin (unix makefiles), the path in the command line for the cmake command was also unix style. If I change this to DOS style, make wont recognize the paths and barfs (since cmake makes the makefiles with DOS style paths now).

How can I configure cmake to use windows paths for these source files only under targets so that eclipse can find them when I launch a debugging session ?

Copyright Notice:Content Author:「marc」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/27609326/cmake-with-cdt4-eclipse-generator-to-generate-unix-makefiles

More about “cmake with CDT4 eclipse generator to generate unix makefiles” related questions

cmake with CDT4 eclipse generator to generate unix makefiles

cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE -D_ECLIPSE_VERSION=4.5 -DCMAKE_SYSTEM_NAME=Windows -DPROJECT_SOURCE_DIR=C:/Projects/tr...

Show Detail

How to specify Unix Makefile generator in CMake?

I was compiling LLVM-7 so I can compile bcc, for there is a command to compile llvm-7 which is cmake -G <generator> [options] <path to llvm sources> I have no clue how to specify <

Show Detail

CMake Error: Could not create named generator XCode

i have checked out llvm/clang/compiler-rt sources from official git repositories, but i'm having: MBA-Anton:llvm_34_xcode_build asmirnov$ cmake -G XCode ../llvm_34 CMake Error: Could not create na...

Show Detail

CMake command not working in VS Code task

I have created a task in my tasks.json file in Visual Studio Code: { "label": "cmake", "command": "cmake", "args": [ "-G", "\"Un

Show Detail

cmake and eclipse: default include paths?

I have a project that builds with CMake system, and I like to import it in Eclipse. However, when I generate eclipse project files with 'cmake -G "Eclipse CDT4 - Unix Makefiles"' there are no default

Show Detail

How to set cmake generator back to default Unix Makefiles?

I am using cmake3.20.0 with wsl2+vscode+Intel oneapi to build my Fortran project. Nearly for some reason I reinstalled ninja, but it seems my CMake generator has been changed to ninja, not by default

Show Detail

Maintain a cmake project (from Eclipse CDT4)

I'm having some difficulties with cmake (2.8.7) and Eclipse + CDT (3.7.1). I'm using a CMakeBuilder (http://www.cmakebuilder.com/), which I found via the search function here. Actually I thought, t...

Show Detail

Cmake generated Eclipse Project - No Source

I am attempting to use CMake to generate eclipse project files. Although I am able to build successfully, I am unable to browse or edit the source in eclipse. This is an out of tree build, where my...

Show Detail

CMake Error: Could not create named generator Visual Studio 14 2015 win64

I want to use caffe deep learning. when I want to run caffe-windows\build_win I recive an error.what is problem? how can I resolve it? caffe is best for deep learning and I want to use it. I instal...

Show Detail

Generate separate eclipse projects using CMake

I'm using CMake to generate a Eclipse CDT project. This "project" really contains a ton of sub-projects in our repo. This is because I'm defining project (sample_project) in my CMakeLists.txt fil...

Show Detail