Giter Site home page Giter Site logo

15knots / cmake4eclipse Goto Github PK

View Code? Open in Web Editor NEW
84.0 3.0 26.0 1.93 MB

Let Eclipse use CMake to generate the buildscripts for Eclipse CDT

License: Eclipse Public License 2.0

HTML 3.42% Java 96.58%
cmake eclipse-cdt eclipse cross-platform cdt

cmake4eclipse's People

Contributors

15knots avatar dependabot[bot] avatar euklid avatar ghaith avatar havogt avatar hefloryd avatar saimen avatar tony-- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cmake4eclipse's Issues

CMake dialog box does not save all modified configs

I have a project with 8 configurations (debug A, debug B, debug C, debug D, release A, release B, release C, release D).
For each configurations, I set some cmake define. I validate by pressing the apply button.
At the end I validate by pressing on the ok button.

Eclipse save only the last modified configuration.

If I do the same, but replace the apply button by ok. button, all define are saved.
This is cumbersome, the properties box is close after each "ok".

NPE when adding an entry on the symbols tab in project properties after clicking Apply

java.lang.NullPointerException
at de.marw.cdt.cmake.core.ui.CMakePropertyTab.saveToModel(CMakePropertyTab.java:197)
at de.marw.cdt.cmake.core.ui.CMakePropertyTab.performApply(CMakePropertyTab.java:286)
at org.eclipse.cdt.ui.newui.AbstractCPropertyTab.handleTabEvent(AbstractCPropertyTab.java:552)
at org.eclipse.cdt.ui.newui.AbstractPage.forEach(AbstractPage.java:1055)
at org.eclipse.cdt.ui.newui.AbstractPage$5.run(AbstractPage.java:672)
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)

make: *** No rule to make target 'all' although "CMake Make Builder" is selected

Hi, I've been trying to use cmake4eclipse in Eclipse Mars for a project.

In Project -> Properties -> C/C++ Build -> Tool Chain Editor, I definitely selected "CMake Make Builder",
And In C/C++ Build, I have selected the External Builder, and "Generate Makefiles automatically".

However, Eclipse still pretends that I'm building a Make Project:

12:30:56 **** Incremental Build of configuration Debug for project xpscore ****
make all 
make: *** No rule to make target 'all'.  Stop.

When I click on Build Project, the Progress window also shows "Invoking CDT Builder", nothing about CMake. I don't know what I'm doing wrong though. How can I get Eclipse to use CMake?

build fails if build directory is a symlink

Hello,

if you create a minimal project, and make the "build" directory a symlink (say to a folder on /tmp), then cmake will mix relative and absolutely resolved paths. Both ninja and make will then fail to build the project.

This is already an issue with cmake, but using /tmp for builds is a common practice. Please resolve the build directory (like "readlink -f" would do) and cd to the absolute path before invoking cmake

can't install version 1.4.0 in eclipse mars.2 release 4.5.2

when trying to upgrade from 1.3.5 the plugin from the update site I get the following error:

Your original request has been modified.
"CDT CMake build integration" is already installed, so an update will be performed instead.
Cannot complete the install because one or more required items could not be found.
Software being installed: CDT CMake build integration 1.4.0.201603051447 (de.marw.cdt.cmake.feature.group 1.4.0.201603051447)
Missing requirement: CMake build integration 1.2.0.201603042155 (de.marw.cmake 1.2.0.201603042155) requires 'package org.eclipse.jetty.util.ajax 0.0.0' but it could not be found
Cannot satisfy dependency:
From: CDT CMake build integration 1.4.0.201603051447 (de.marw.cdt.cmake.feature.group 1.4.0.201603051447)
To: de.marw.cmake [1.2.0.201603042155]

I also tried uninstalling/installing but gives the same error that org.eclipse.jetty.util.ajax could not be found

Default build location (request honor Eclipse build directory spec)

The default of putting build_scripts under build/ is a poor choice: you're assuming the name of my Eclipse project corresponds to some actual location on my filesystem (which, in my case, it does not). My Eclipse project is named AE3007C2, but the root is at AE3007/C2. I would request that cmake4eclipse honor the Eclipse build directory instead of the current default behavior for improved flexibility/robustness to cover a wide variety of end user environments.

CMAKE_EXPORT_COMPILE_COMMANDS parser doesn't support target triplets for gcc

CMAKE_EXPORT_COMPILE_COMMANDS parser should support gcc target triplets such as arm-none-eabi. When I try to use such toolchain I get warning and no include paths are detected: /blinky/build/Debug/compile_commands.json: No parser for command 'C:/ARM/gcc/5_4_2016q2/bin/arm-none-eabi-gcc.exe -DSTM32F4 -DSTM32F429xx -IC:/ARM/stm32cmake/stm32-cmake/stm32-blinky -IC:/ARM/CUBE/F4/STM32Cube_FW_F4_V1.12.0/Drivers/CMSIS/Device/ST/STM32F4xx/Include -IC:/ARM/CUBE/F4/STM32Cube_FW_F4_V1.12.0/Drivers/CMSIS/Include -IC:/ARM/CUBE/F4/STM32Cube_FW_F4_V1.12.0/Drivers/STM32F4xx_HAL_Driver/Inc -mthumb -fno-builtin -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -Wall -std=gnu99 -ffunction-sections -fdata-sections -fomit-frame-pointer -mabi=aapcs -fno-unroll-loops -ffast-math -ftree-vectorize -Og -g -o CMakeFiles/stm32-blinky.dir/main.c.obj -c C:/ARM/stm32cmake/stm32-cmake/stm32-blinky/main.c', skipped

No parallel build available

When choosing Gnu Make Builder in the project properties I can set the number of cores I would like to use for the build. However, when I switch the builder to CMake Builder (portable) this option vanishes.
How can I use parallel builds with CMake generated Makefiles?

Build occurs in eclipse install directory

Create a cmake project, build once, then delete the build directory and build again. The build directory occurs under the eclipse install directory:

11:36:29 AM **** Buildscript generation of configuration Debug for project cmake-tutorial
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -G "Unix Makefiles" /home/francisg/shared/cmake-tutorial 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/francisg/eclipse/cpp-neon/eclipse

When building once again, the build occurs in the right directory /path/to/project/build/Debug.

Error upgrading to 1.4.6

I tried to upgrade to 1.4.6 but I got the following error:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.cpp, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,de.marw.cdt.cmake.core,1.3.7.201703201434
No repository found containing: org.eclipse.update.feature,de.marw.cdt.cmake,1.4.6.201703201434

I have cmake4eclipse setup as a software site with URL https://raw.githubusercontent.com/15knots/cmake4eclipse/master/releng/comp-update/

I'm running Eclipse 4.6.2 with CDT 9.2.0 on Ubuntu 16.04.2

Variable substitution for CMake executable

Setting the CMake executable under "Host OS override" to a variable for substitution does not work.

This is especially useful when using cross-compilation on multiple targets.

I.e:
Using c/c++ -> Enviroment
$NATIVE_SYSROOT/usr/bin/cmake
or
Shell enviroment
${env_var:NATIVE_SYSROOT}/usr/bin/cmake
or
$NATIVE_SYSROOT is a eclipse build variable (c/c++ -> Build Variable macro)

It would be great if that would be possible.

Cheers
Carl

Export compile commands provider does not resolve header includes

When enabling CMAKE_EXPORT_COMPILE_COMMANDS Parser, the headers are not resolved. However, when selecting the CTD GCC Build Output Parser and using the GCC compiler, the includes are resolved correctly. I verified that the file build/Debug/compile_commands.json exists and its content seems legit:

[
{
  "directory": "/home/francisg/shared/qt5-project/build/Debug",
  "command": "/bin/c++   -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -I/home/francisg/shared/qt5-project/build/Debug -I/home/francisg/shared/qt5-project -isystem /home/francisg/Qt5.9.0/5.9/gcc_64/include -isystem /home/francisg/Qt5.9.0/5.9/gcc_64/include/QtWidgets -isystem /home/francisg/Qt5.9.0/5.9/gcc_64/include/QtGui -isystem /home/francisg/Qt5.9.0/5.9/gcc_64/include/QtCore -isystem /home/francisg/Qt5.9.0/5.9/gcc_64/./mkspecs/linux-g++  -g   -fPIC -std=gnu++11 -o CMakeFiles/foo.dir/main.cpp.o -c /home/francisg/shared/qt5-project/main.cpp",
  "file": "/home/francisg/shared/qt5-project/main.cpp"
},
...

Here is the relevant section from the language.settings.xml

        <configuration id="cdt.managedbuild.config.gnu.cross.exe.debug.1813080996" name="Debug">
                <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
                        <provider-reference id="de.marw.cmake.cdt.language.settings.providers.CompileCommandsJsonParser" ref="shared-provider"/>
                        <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
                        <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
                        <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
                        <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-308201783778743091" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
                                <language-scope id="org.eclipse.cdt.core.gcc"/>
                                <language-scope id="org.eclipse.cdt.core.g++"/>
                        </provider>
                </extension>
        </configuration>

P.S I'm sorry for this 3rd issue today ;-)

CMAKE_EXPORT_COMPILE_COMMANDS Parser double backslashes on windows

compile_commands.jsonfile contain double backslashes on windows. Include directories specified in cmakelists might not be properly passed to the CDT indexer.
{ "directory": "D:/cevdata/.interface_simple", "command": "C:\\MinGW-w64\\bin\\i686-w64-mingw32-c++.exe @CMakeFiles/ccd-rt_te_interface_simple.dir/includes_CXX.rsp -g -o CMakeFiles\\ccd-rt_te_interface_simple.dir\\simple_te.cpp.obj -c D:\\cevdata\\.interface_simple\\simple_te.cpp", "file": "D:/cevdata/.interface_simple/simple_te.cpp" },

ResourceException: Resource '/xyz/build/Debug/CMakeCache.txt' does not exist

Using Eclipse 4.4 (Luna) and latest Cmake.
I've selected the CMake Builder (portable) as the active toolchain (under project properties C/C++ Build -> Tool Chain Editor), but the Eclipse generates an error dialogue when I attempt to build the project (see below). Could it be the trailing '}' in the project name? Looks like a bug in the parsing of my build directory (which is ${workspace_loc:/AE3007C2}/). Please advise.

"
Errors occurred during the build.
Errors running builder 'CDT Builder' on project 'AE3007C2'.
Resource '/AE3007C2}/CMakeCache.txt' does not exist.
Resource '/AE3007C2}/CMakeCache.txt' does not exist.
"

Improve support for code-completion and symbol browsing in CDT source editors

CDT needs to know about non-standard include paths and preprocessor macros.
Currently, the CMake Build Output Parser of the plugin tries to get this information from the build output and feeds it to the CDT indexer. Parsing the build output to feed the indexer works well on linux with make and gcc. This cannot work if

  • the build tool does not print the compiler commands (as with ninja),
  • the cmake generator decides to pass compiler commands in files (as
    with make under windows),
  • the compiler arguments are not POSIX compatible ('-D' for marcos, '-I' for
    include dirs, command name 'cc') as with the microsoft compiler.

Since cmake v. 2.8.11, cmake can be instructed to write this information to a json-formatted file. A new LanguaseSettingsProvider should be added which parses that file and feeds the indexer.

No error message in build log, when cmake executable could not be found

Just an entry in the eclipse log, which is not very helpful.

java.io.IOException: Cannot run program "C:\msys64\usr\bin\cmake.exeC:\msys64\usr\bin\cal.exeC:\msys64\usr\bin\cmake": Launching failed at org.eclipse.cdt.utils.spawner.Spawner.exec(Spawner.java:349) at org.eclipse.cdt.utils.spawner.Spawner.<init>(Spawner.java:91) at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(ProcessFactory.java:91) at org.eclipse.cdt.core.CommandLauncher.execute(CommandLauncher.java:194) at de.marw.cdt.cmake.core.internal.BuildscriptGenerator.invokeCMake(BuildscriptGenerator.java:312) at de.marw.cdt.cmake.core.internal.BuildscriptGenerator.regenerateMakefiles(BuildscriptGenerator.java:236) at de.marw.cdt.cmake.core.internal.BuildscriptGenerator.generateMakefiles(BuildscriptGenerator.java:148) at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.performMakefileGeneration(CommonBuilder.java:1008)

CMAKE_EXPORT_COMPILE_COMMANDS Parser fails for command paths using a forward slash

I am using cmake4eclipse on Windows with MSYS2. Unfortunately, the CMAKE_EXPORT_COMPILE_COMMANDS Parser fails to recognize the command parser due to forward slashes in the command path:

/Project/compile_commands.json: No parser for command 'D:/Project/Tools/MSYS2/mingw64/bin/cc.exe -DSTM32F205xx -DUNITTEST @CMakeFiles/usbh.dir/includes_C.rsp -O3 -DNDEBUG -fprofile-arcs -ftest-coverage -o CMakeFiles/usbh.dir/STMicro/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_core.c.obj -c D:/Project/EclipseWS_MSYS2/PogoSMAC/src/main/ThirdParty/STMicro/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_core.c', skipped

If all forward slashes ("/") are replaced by double backslashes ("\"), everything works as expected.

Output of Make is not printed

CMake seems to print out all of it's info while generating, but nothing is printed by make.
If I go to the build directory and run make myself in the terminal I see what I'm expecting, but not in the eclipse console.

Any idea what's happening?

Build output location does not support variable expansion.

Hi,
I'm trying to use a variable from the environment to set as my build path. But unfortunately this doesn't seem to be possible. The variable expansion doesn't seem to work in this field.

e.g
Where [ ] is the input field
Build Output location
[ build_${OECORE_SDK_VERSION} ]

[ build_${env_var:OECORE_SDK_VERSION} ]

It would be really great to have this ๐Ÿ‘

CMAKE_EXPORT_COMPILE_COMMANDS Parser should support different versions of compilers

It is quite common if you have multiple versions of compiler for them to be installed with version as suffix (for example at the moment I have clang++, clang++35, clang++40, g++, g++5 and g++6). I am not sure about possible version suffixes (if it is possible to have say g++5.1 or it would always be g++51), but at the moment those compilers do not work well with cmake4eclipse.

Other than that this is really nice plugin (it is the only that gave me proper C++14 support in eclipse). Thanks for building it :-)

how to use this plugin?

Hello, I'm sorry for the dumb question but I'm really not able to understand how this plug in works, it's written that it "automatically generates buildscripts for the Eclipse CDT", but when?
I mean when I use eclipse to write a program in c I press "build" and then "run", now I have a cmake project which obviously doesn't work natively on eclipse, so I installed it and now? Do I have to configure it to make convert this cmake project into something runnable for eclipse?

Thank you so much.

CMAKE_EXPORT_COMPILE_COMMANDS Parser doesn't work if compiler command doesn't contain full path

For example if in CMakeLists.txt I have

set(CMAKE_CXX_COMPILER "clang++")

there would be bunch of errors reported

!ENTRY de.marw.cmake 2 0 2017-07-12 17:47:17.122
!MESSAGE /fEngine/build/Default/compile_commands.json: No parser for command 'clang++ -DfEngine_EXPORTS -I/usr/local/include/c++/v1 -I/usr/local/include -fPIC -std=c++1y -stdlib=libc++ -DFENGINE_BUILD -include /home/rivan/workspace/fEngine/src/fEngine/pch.hpp -o CMakeFiles/fEngine.dir/templates/TemplateFileTagFactory.cpp.o -c /home/rivan/workspace/fEngine/src/fEngine/templates/TemplateFileTagFactory.cpp', skipped

if I instead put

set(CMAKE_CXX_COMPILER "/usr/bin/clang++")

everything works perfectly.

Multiple targets

Hello,

First time user of cmake4eclipse.

The project I'm working was handled properly by cmake4eclipse, good start. The project consist of multiple target (libs and executables). Cmake4eclipse created a build target at the root of the project but it did not create individual build target for each target. Is there any way targets.

I also could not find a way to enabled parallel build. This setting is usually in the Behavior tab of "C/C Build) but when set to cmake builder it is not there anymore.

Regards,
Mario

Cmake seems to ignore the environment set in Eclipse

When I add a variable to C++ Build->Environment or C++ Build->Build Variables, it's not present in the environment Cmake is used to run from.
For me it means I'll have to either modify my Cmake scripts or skip the plugin for the time being.

Enabling build output parser does not pass necessary arguments to cmake

In Project -> Properties -> C/C++ General -> Preprocessor Include Paths -> Providers enabling CMAKE_EXPORT_COMPILE_COMMANDS and/or CDT GCC Build Output Parser has no effect. Deleting the build directory and rebuilding, the cmake command does not have the required arguments:

cmake -DCMAKE_BUILD_TYPE:STRING=Debug -G "Unix Makefiles" /home/francisg/shared/cmake-tutorial

Providing manually the required options to cmake on the command line, the file compile_commands.json is generated as expected:

$ cmake -DCMAKE_BUILD_TYPE:STRING=Debug -G "Unix Makefiles" /home/francisg/shared/cmake-tutorial -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

Is it possible to make it instructing paths and symbols from generated Makefiles

First of all, many thanks for you efforts.

I got a compilable project, so the build/clean works perfectly.
However, Eclipse Indexer doesn't resolve names and paths (I use non-default compiler specified in the root CMakeLists.txt and a number of libraries).

  1. In "Path and Symbols" Symbols list is empty
  2. In "Path and Symbols" Includes list is empty as well
  3. "Preprocessor Include Paths, Macros, etc" contains a default set of include directories and default preprocessor symbols.

May be I created project somehow incorrectly:

  • C/C++ Project
  • Empty or Existing CMake Project

Please could you advise or plan an improvement?

Include response file

Note I have to use the following to have the compile_command.json parser work as it is unable to follow the reference.

set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 0)

Example compile_commands.json without the above directive:

[
{
  "directory": "C:/Users/arubin/workspace/FaceService/build/Debug/src",
  "command": "/C/msys64/mingw64/bin/g++.exe   @CMakeFiles/FaceService.dir/includes_CXX.rsp  -std=c++14 -g   -std=c++11 -o CMakeFiles/FaceService.dir/main
.cpp.obj -c /C/Users/arubin/workspace/FaceService/src/main.cpp",
  "file": "C:/Users/arubin/workspace/FaceService/src/main.cpp"
}
]

here is the corresponding includes_CXX.rsp:

-I"C:/Program Files/dlib/include"

A build or clean without build directory will try to use "rm"

Hello, it seems that a clean operation will be executed by some kind of "Parent Builder" if cmake was not run before (and the files are missing), even if a build is requested.
First, this fails on Windows as there is no rm executable, and more importantly it will deduce some names from the project and sources and tries to delete them - in some unspecified directory.

eg. the attached Project will output the following, note that this doesn`t care at all about the CMake files and instead guesses the names:

11:16:26 **** Clean-only build of configuration Release for project uit_mon ****
rm -rf uit_mon src/main.d src/main.o
Cannot run program "rm": Launching failed

uit.zip

(A workaround is to disable the "clean" checkbox in C/C++ Build -> Behaviour, then build once)

Cannot generate solution files for MS Visual Studio`

When running from Eclipse on Windows it is not possible to let CMake generate output files for Visual Studio. Once can do this easily on the command line. This is really annoying as with this feature available we could use Eclipse also on Windows for code development :(

Is there a reason why this is not implemented?

usage description

could you extend readme with a description of the using ?
I used cmake in qtcreator and clion IDEs, there I have to just Open cmakelists,
and optionally pass command line parameters to cmake and IDE generates cmake cache and project files.

what is a scenario here? doesn't look that is here similary...

CMAKE_EXPORT_COMPILE_COMMANDS Parser fails if compiler executable has a MSDOS "Short path" name

On Windows the compile_commands.json faisl to process a few entries, if those are using the MSDOS "Short Path" Variant.

In the json file, some entries use C:\\PROGRA~2\\Atmel\\AVR8-G~1\\bin\\avr-gcc.exe, others use C:\\PROGRA~2\\Atmel\\AVR8-G~1\\bin\\AVR-G_~1.EXE. I believe it depends whether the soures are generated or not, but I am not sure. (Filesystem is NTFS, so generally short paths should not be needed at all)

eclipse.buildId=4.6.3.M20170222-0400
java.version=1.8.0_121
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.cpp.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.cpp.product

de.marw.cmake
Warning
Wed Apr 12 13:57:03 CEST 2017
/uit2/build/Debug/compile_commands.json: No parser for command 'C:\PROGRA~2\Atmel\AVR8-G~1\bin\AVR-G_~1.EXE  -DF_CPU=8000000  -g   -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -Wall -Wpointer-arith -Wsign-compare -fstrict-overflow -Wdeprecated --pipe -fmessage-length=0 -mmcu=attiny84 -Wnoexcept -fno-exceptions -fno-rtti -std=gnu++11 -o CMakeFiles\print_compdefs.dir\_lib\print_compdefs.tmp.cpp.obj -c D:\temp\CDH-821\build\Debug\_lib\print_compdefs.tmp.cpp', skipped

Misleading term 'managed make project' in documentation..

..confuses first-time users.

CDT dev docs use Managed Build System (where CDT generates build scripts) and Makefile project (users must write make scripts), these terms slipped into the plugin documentation.
In contrast, CDT UI use uses terms C project, C++ project and Makefile Project.

Plugin docs state:

CMake for CDT requires a managed make C/C++ project to work with

which mis-leads users to try to import the Eclipse project that was generated by cmake (a Makefile Project)

CMAKE_EXPORT_COMPILE_COMMANDS Parser treats g++ cross compiler as a C compiler

When using a g++ cross compiler the parser adds the entries to the C compiler instead of the C++ compiler. On lines 130 and 131 of CompileCommandsJsonParser.java the g++ cross compilers are added to knownCmdParsers with the type gcc:

knownCmdParsers.put(".+-g\\+\\+", gcc);
knownCmdParsers.put(".+-g\\+\\+\\.exe", gcc);

I assume the type should be cpp instead.

CMakeFiles, cache and others generated into wrong directory

Hi!

We're running into some kind of strange trouble with the cmake4eclipse plugin (latest version from eclipse marketplace). We are developing a project with CMake and arm embedded toolchain, and thus using the cross-compiler. With some minor issues, and arm-none-eabi-* in PATH, it seems to work fine. However, if the compiler is not found, the cmake fails with the relevant errors (see below).

The strange thing about this is, that the (incomplete) cache is not generated in the project's directory as usual, but in the working directory of Eclipse (in this case /tmp, however we observed the same when running eclipse "from" home). The build directories are not even generated.

In case we're running eclipse with PWD=HOME, this complicates the matter further -- when the problem is fixed, the broken cache from home is loaded into cmake, and causes mysterious cmake failures.

Any ideas on what could be wrong, or how to get more information about how cmake (in which directory) is executed and why?

Thanks!

cmake -DCMAKE_BUILD_TYPE:STRING=Debug --debug-output -DCMAKE_BUILD_TYPE:INTERNAL=Xplain -G "Unix Makefiles" /home/krakonos/XXX
Running with debug output on.
-- The C compiler identification is unknown
   Called from: [3]	/usr/share/cmake-3.7/Modules/CMakeDetermineCompilerId.cmake
                [2]	/usr/share/cmake-3.7/Modules/CMakeDetermineCCompiler.cmake
                [1]	/home/krakonos/XXX/CMakeLists.txt
-- The CXX compiler identification is unknown
   Called from: [3]	/usr/share/cmake-3.7/Modules/CMakeDetermineCompilerId.cmake
                [2]	/usr/share/cmake-3.7/Modules/CMakeDetermineCXXCompiler.cmake
                [1]	/home/krakonos/XXX/CMakeLists.txt
CMake Error at CMakeLists.txt:28 (project):
  The CMAKE_C_COMPILER:

    arm-none-eabi-gcc

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


   Called from: [1]	/home/krakonos/XXX/CMakeLists.txt
CMake Error at CMakeLists.txt:28 (project):
  The CMAKE_CXX_COMPILER:

    arm-none-eabi-g++

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


   Called from: [1]	/home/krakonos/XXX/CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "/tmp/CMakeFiles/CMakeOutput.log".
See also "/tmp/CMakeFiles/CMakeError.log".

No content.xml file in comp-update - Eclipse cannot install the plugin

I am trying to install the newest version of the plugin into Eclipse Oxygen, but the loading takes forever and when it is finally over - I get the message that file https :// raw.githubusercontent.com/15knots/cmake4eclipse/master/releng/comp-update/content.xml could not be found (which is reasonable, as it is not there).

Trouble with non-standard CMAKE_BUILD_TYPE

Hello again!

We've noticed another problem: when setting non-standard build types (for example Xplain in #26), the option -DCMAKE_BUILD_TYPE:STRING=Debug is passed regardless of the other options. We have a workaround, to specify :INTERNAL, which implies FORCE and rewrites the cache -- however, a cleaner solution would be prefered. Is there a better solution, or any chance that it could get implemented?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.