Fail to use CMake to create the project for Eclipse
Created by: wumouyan
Hi, Charles, I am trying to use CMake to create the project for Eclipse, but it seems fail, the details are as follows,
- I use the command as follows,
$ cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DECLIPSE_CDT4_GENERATE_SOURCE_PROJECT=TRUE -DCMAKE_ECLIPSE_VERSION=4.7 -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-j8 ../
(my CMake version is 3.5.1 , Eclipse version is 4.7.1)
the Warnings are shown as follows:
1.CMake Warning in CMakeLists.txt: ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT is set to TRUE, but this variable is not supported anymore since CMake 2.8.7. Enable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT instead.
2.CMake Warning in CMakeLists.txt: The build directory is a subdirectory of the source directory. This is not supported well by Eclipse. It is strongly recommended to use a build directory which is a sibling of the source directory.
when I import the project to Eclipse, I find that I can see only a series of cmake files but none of src files and I can not build the project in Eclipse.
it seems that
- the ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT=TRUE is not work, but when I change the command what the terminal suggest, i.e. CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE, the CMake does work, and the errors are follows:
-- Configuring incomplete, errors occurred! See also "/home/wu/work/gnss-sdr-master/build/CMakeFiles/CMakeOutput.log". See also "/home/wu/work/gnss-sdr-master/build/CMakeFiles/CMakeError.log".
- Will the warning2 affect the project too ?
How can I successfully generate the full functional Eclipse project?
Best regards, Wu