CMake project generator for Eclipse cdt on Linux?












0















I have been looking for a good IDE for c++, and Eclipse CDT seems to be a good candidate. I develop(ed) my projects in CMake, which means I need to be able to generate an Eclipse project with CMake in order to use Eclipse. CMake has an configuration option for Eclipse, but it's old and incomplete.(My version 4.9 isn't supported anymore)



So I am wondering if there is another way to generate a Eclipse project using CMake, that is compatible with newer Eclipse versions. Does anyone know of one?
The Eclipse project generator HAS to be separate, it can't be integrated into Eclipse itself, as I need the project source files to be in a different location than the build files.(For GIT)



Thanks!










share|improve this question



























    0















    I have been looking for a good IDE for c++, and Eclipse CDT seems to be a good candidate. I develop(ed) my projects in CMake, which means I need to be able to generate an Eclipse project with CMake in order to use Eclipse. CMake has an configuration option for Eclipse, but it's old and incomplete.(My version 4.9 isn't supported anymore)



    So I am wondering if there is another way to generate a Eclipse project using CMake, that is compatible with newer Eclipse versions. Does anyone know of one?
    The Eclipse project generator HAS to be separate, it can't be integrated into Eclipse itself, as I need the project source files to be in a different location than the build files.(For GIT)



    Thanks!










    share|improve this question

























      0












      0








      0








      I have been looking for a good IDE for c++, and Eclipse CDT seems to be a good candidate. I develop(ed) my projects in CMake, which means I need to be able to generate an Eclipse project with CMake in order to use Eclipse. CMake has an configuration option for Eclipse, but it's old and incomplete.(My version 4.9 isn't supported anymore)



      So I am wondering if there is another way to generate a Eclipse project using CMake, that is compatible with newer Eclipse versions. Does anyone know of one?
      The Eclipse project generator HAS to be separate, it can't be integrated into Eclipse itself, as I need the project source files to be in a different location than the build files.(For GIT)



      Thanks!










      share|improve this question














      I have been looking for a good IDE for c++, and Eclipse CDT seems to be a good candidate. I develop(ed) my projects in CMake, which means I need to be able to generate an Eclipse project with CMake in order to use Eclipse. CMake has an configuration option for Eclipse, but it's old and incomplete.(My version 4.9 isn't supported anymore)



      So I am wondering if there is another way to generate a Eclipse project using CMake, that is compatible with newer Eclipse versions. Does anyone know of one?
      The Eclipse project generator HAS to be separate, it can't be integrated into Eclipse itself, as I need the project source files to be in a different location than the build files.(For GIT)



      Thanks!







      c++ eclipse cmake generator






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 23 '18 at 13:02









      appmaker1358appmaker1358

      427




      427
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I hope I understand you correctly, that you want to use the CMake to generate a "project file" that you can later use to work with the Eclipse CDT.



          You can generate a "Unix Makefile" from CMake. The option appears in the drop down menu, when you click configure, if you start cmake with gui in Linux (by typing cmake-gui at the terminal).



          And then create a new project in the Eclipse CDT IDE by using the "Makefile Project with Existing Code" option in the menu (File->New->Project->"Makefile Project with Existing Code").



          In this way, you will be able to use the Eclipse CDT IDE with your project.






          share|improve this answer


























          • Unfortunately, that will only partially work. There are no build targets loaded, and I can't access the source because it's in a different location. Is there any other way?

            – appmaker1358
            Nov 23 '18 at 19:38











          • You do not need "build targets" per se. If you click from menu-bar -> "project" -> "build all", it will build your project. Depending on how you setup the Makefile using the CMake parameters, the build will be in a different location. That is not an issue. In fact, that is pretty standard. I setup all my projects like that, with builds outside the source.

            – Joey Mallone
            Nov 23 '18 at 22:25













          • The problem is that I need to be able to compile parts of my project separately, and be able to debug an executable(I have multiple) And the source problem persists, Eclipse won't allow me to access my source files if the makefiles are in a different location.

            – appmaker1358
            Nov 24 '18 at 14:07











          • 1. Ok, for the first problem, probably there is no solution. One way that is possible at least in my case is, I import into eclipse then just a sub-project. So each folder has makefile and I can open just this folder in Eclipse and will not need to compile the whole project. 2. I am not sure, how and why your makefiles are in a different location to the source. 3. I understand you want to prevent checking in your makefile to the git repo, but for that you can simply add the makefile in .gitignore and thus not have to see or commit it to the git repo.

            – Joey Mallone
            Nov 24 '18 at 14:13











          • It is CMake reccommended practice to put all build files in a different directory, and Eclipse also start's spamming my project folder when i give it my makefile, I just don't want that. But I'll keep looking.

            – appmaker1358
            Nov 24 '18 at 14:15












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53447212%2fcmake-project-generator-for-eclipse-cdt-on-linux%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          I hope I understand you correctly, that you want to use the CMake to generate a "project file" that you can later use to work with the Eclipse CDT.



          You can generate a "Unix Makefile" from CMake. The option appears in the drop down menu, when you click configure, if you start cmake with gui in Linux (by typing cmake-gui at the terminal).



          And then create a new project in the Eclipse CDT IDE by using the "Makefile Project with Existing Code" option in the menu (File->New->Project->"Makefile Project with Existing Code").



          In this way, you will be able to use the Eclipse CDT IDE with your project.






          share|improve this answer


























          • Unfortunately, that will only partially work. There are no build targets loaded, and I can't access the source because it's in a different location. Is there any other way?

            – appmaker1358
            Nov 23 '18 at 19:38











          • You do not need "build targets" per se. If you click from menu-bar -> "project" -> "build all", it will build your project. Depending on how you setup the Makefile using the CMake parameters, the build will be in a different location. That is not an issue. In fact, that is pretty standard. I setup all my projects like that, with builds outside the source.

            – Joey Mallone
            Nov 23 '18 at 22:25













          • The problem is that I need to be able to compile parts of my project separately, and be able to debug an executable(I have multiple) And the source problem persists, Eclipse won't allow me to access my source files if the makefiles are in a different location.

            – appmaker1358
            Nov 24 '18 at 14:07











          • 1. Ok, for the first problem, probably there is no solution. One way that is possible at least in my case is, I import into eclipse then just a sub-project. So each folder has makefile and I can open just this folder in Eclipse and will not need to compile the whole project. 2. I am not sure, how and why your makefiles are in a different location to the source. 3. I understand you want to prevent checking in your makefile to the git repo, but for that you can simply add the makefile in .gitignore and thus not have to see or commit it to the git repo.

            – Joey Mallone
            Nov 24 '18 at 14:13











          • It is CMake reccommended practice to put all build files in a different directory, and Eclipse also start's spamming my project folder when i give it my makefile, I just don't want that. But I'll keep looking.

            – appmaker1358
            Nov 24 '18 at 14:15
















          0














          I hope I understand you correctly, that you want to use the CMake to generate a "project file" that you can later use to work with the Eclipse CDT.



          You can generate a "Unix Makefile" from CMake. The option appears in the drop down menu, when you click configure, if you start cmake with gui in Linux (by typing cmake-gui at the terminal).



          And then create a new project in the Eclipse CDT IDE by using the "Makefile Project with Existing Code" option in the menu (File->New->Project->"Makefile Project with Existing Code").



          In this way, you will be able to use the Eclipse CDT IDE with your project.






          share|improve this answer


























          • Unfortunately, that will only partially work. There are no build targets loaded, and I can't access the source because it's in a different location. Is there any other way?

            – appmaker1358
            Nov 23 '18 at 19:38











          • You do not need "build targets" per se. If you click from menu-bar -> "project" -> "build all", it will build your project. Depending on how you setup the Makefile using the CMake parameters, the build will be in a different location. That is not an issue. In fact, that is pretty standard. I setup all my projects like that, with builds outside the source.

            – Joey Mallone
            Nov 23 '18 at 22:25













          • The problem is that I need to be able to compile parts of my project separately, and be able to debug an executable(I have multiple) And the source problem persists, Eclipse won't allow me to access my source files if the makefiles are in a different location.

            – appmaker1358
            Nov 24 '18 at 14:07











          • 1. Ok, for the first problem, probably there is no solution. One way that is possible at least in my case is, I import into eclipse then just a sub-project. So each folder has makefile and I can open just this folder in Eclipse and will not need to compile the whole project. 2. I am not sure, how and why your makefiles are in a different location to the source. 3. I understand you want to prevent checking in your makefile to the git repo, but for that you can simply add the makefile in .gitignore and thus not have to see or commit it to the git repo.

            – Joey Mallone
            Nov 24 '18 at 14:13











          • It is CMake reccommended practice to put all build files in a different directory, and Eclipse also start's spamming my project folder when i give it my makefile, I just don't want that. But I'll keep looking.

            – appmaker1358
            Nov 24 '18 at 14:15














          0












          0








          0







          I hope I understand you correctly, that you want to use the CMake to generate a "project file" that you can later use to work with the Eclipse CDT.



          You can generate a "Unix Makefile" from CMake. The option appears in the drop down menu, when you click configure, if you start cmake with gui in Linux (by typing cmake-gui at the terminal).



          And then create a new project in the Eclipse CDT IDE by using the "Makefile Project with Existing Code" option in the menu (File->New->Project->"Makefile Project with Existing Code").



          In this way, you will be able to use the Eclipse CDT IDE with your project.






          share|improve this answer















          I hope I understand you correctly, that you want to use the CMake to generate a "project file" that you can later use to work with the Eclipse CDT.



          You can generate a "Unix Makefile" from CMake. The option appears in the drop down menu, when you click configure, if you start cmake with gui in Linux (by typing cmake-gui at the terminal).



          And then create a new project in the Eclipse CDT IDE by using the "Makefile Project with Existing Code" option in the menu (File->New->Project->"Makefile Project with Existing Code").



          In this way, you will be able to use the Eclipse CDT IDE with your project.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 23 '18 at 14:04

























          answered Nov 23 '18 at 13:53









          Joey MalloneJoey Mallone

          2,26361933




          2,26361933













          • Unfortunately, that will only partially work. There are no build targets loaded, and I can't access the source because it's in a different location. Is there any other way?

            – appmaker1358
            Nov 23 '18 at 19:38











          • You do not need "build targets" per se. If you click from menu-bar -> "project" -> "build all", it will build your project. Depending on how you setup the Makefile using the CMake parameters, the build will be in a different location. That is not an issue. In fact, that is pretty standard. I setup all my projects like that, with builds outside the source.

            – Joey Mallone
            Nov 23 '18 at 22:25













          • The problem is that I need to be able to compile parts of my project separately, and be able to debug an executable(I have multiple) And the source problem persists, Eclipse won't allow me to access my source files if the makefiles are in a different location.

            – appmaker1358
            Nov 24 '18 at 14:07











          • 1. Ok, for the first problem, probably there is no solution. One way that is possible at least in my case is, I import into eclipse then just a sub-project. So each folder has makefile and I can open just this folder in Eclipse and will not need to compile the whole project. 2. I am not sure, how and why your makefiles are in a different location to the source. 3. I understand you want to prevent checking in your makefile to the git repo, but for that you can simply add the makefile in .gitignore and thus not have to see or commit it to the git repo.

            – Joey Mallone
            Nov 24 '18 at 14:13











          • It is CMake reccommended practice to put all build files in a different directory, and Eclipse also start's spamming my project folder when i give it my makefile, I just don't want that. But I'll keep looking.

            – appmaker1358
            Nov 24 '18 at 14:15



















          • Unfortunately, that will only partially work. There are no build targets loaded, and I can't access the source because it's in a different location. Is there any other way?

            – appmaker1358
            Nov 23 '18 at 19:38











          • You do not need "build targets" per se. If you click from menu-bar -> "project" -> "build all", it will build your project. Depending on how you setup the Makefile using the CMake parameters, the build will be in a different location. That is not an issue. In fact, that is pretty standard. I setup all my projects like that, with builds outside the source.

            – Joey Mallone
            Nov 23 '18 at 22:25













          • The problem is that I need to be able to compile parts of my project separately, and be able to debug an executable(I have multiple) And the source problem persists, Eclipse won't allow me to access my source files if the makefiles are in a different location.

            – appmaker1358
            Nov 24 '18 at 14:07











          • 1. Ok, for the first problem, probably there is no solution. One way that is possible at least in my case is, I import into eclipse then just a sub-project. So each folder has makefile and I can open just this folder in Eclipse and will not need to compile the whole project. 2. I am not sure, how and why your makefiles are in a different location to the source. 3. I understand you want to prevent checking in your makefile to the git repo, but for that you can simply add the makefile in .gitignore and thus not have to see or commit it to the git repo.

            – Joey Mallone
            Nov 24 '18 at 14:13











          • It is CMake reccommended practice to put all build files in a different directory, and Eclipse also start's spamming my project folder when i give it my makefile, I just don't want that. But I'll keep looking.

            – appmaker1358
            Nov 24 '18 at 14:15

















          Unfortunately, that will only partially work. There are no build targets loaded, and I can't access the source because it's in a different location. Is there any other way?

          – appmaker1358
          Nov 23 '18 at 19:38





          Unfortunately, that will only partially work. There are no build targets loaded, and I can't access the source because it's in a different location. Is there any other way?

          – appmaker1358
          Nov 23 '18 at 19:38













          You do not need "build targets" per se. If you click from menu-bar -> "project" -> "build all", it will build your project. Depending on how you setup the Makefile using the CMake parameters, the build will be in a different location. That is not an issue. In fact, that is pretty standard. I setup all my projects like that, with builds outside the source.

          – Joey Mallone
          Nov 23 '18 at 22:25







          You do not need "build targets" per se. If you click from menu-bar -> "project" -> "build all", it will build your project. Depending on how you setup the Makefile using the CMake parameters, the build will be in a different location. That is not an issue. In fact, that is pretty standard. I setup all my projects like that, with builds outside the source.

          – Joey Mallone
          Nov 23 '18 at 22:25















          The problem is that I need to be able to compile parts of my project separately, and be able to debug an executable(I have multiple) And the source problem persists, Eclipse won't allow me to access my source files if the makefiles are in a different location.

          – appmaker1358
          Nov 24 '18 at 14:07





          The problem is that I need to be able to compile parts of my project separately, and be able to debug an executable(I have multiple) And the source problem persists, Eclipse won't allow me to access my source files if the makefiles are in a different location.

          – appmaker1358
          Nov 24 '18 at 14:07













          1. Ok, for the first problem, probably there is no solution. One way that is possible at least in my case is, I import into eclipse then just a sub-project. So each folder has makefile and I can open just this folder in Eclipse and will not need to compile the whole project. 2. I am not sure, how and why your makefiles are in a different location to the source. 3. I understand you want to prevent checking in your makefile to the git repo, but for that you can simply add the makefile in .gitignore and thus not have to see or commit it to the git repo.

          – Joey Mallone
          Nov 24 '18 at 14:13





          1. Ok, for the first problem, probably there is no solution. One way that is possible at least in my case is, I import into eclipse then just a sub-project. So each folder has makefile and I can open just this folder in Eclipse and will not need to compile the whole project. 2. I am not sure, how and why your makefiles are in a different location to the source. 3. I understand you want to prevent checking in your makefile to the git repo, but for that you can simply add the makefile in .gitignore and thus not have to see or commit it to the git repo.

          – Joey Mallone
          Nov 24 '18 at 14:13













          It is CMake reccommended practice to put all build files in a different directory, and Eclipse also start's spamming my project folder when i give it my makefile, I just don't want that. But I'll keep looking.

          – appmaker1358
          Nov 24 '18 at 14:15





          It is CMake reccommended practice to put all build files in a different directory, and Eclipse also start's spamming my project folder when i give it my makefile, I just don't want that. But I'll keep looking.

          – appmaker1358
          Nov 24 '18 at 14:15




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53447212%2fcmake-project-generator-for-eclipse-cdt-on-linux%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini