Open wuhy08 opened 5 years ago
It‘s a bug with CMake 3.13 bundled with CLion and Catkin, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=915148.
Try setting CLion to use the lower version system CMake, or apply this to your Catkin install: https://github.com/ros/catkin/pull/975/files
Much thanks! I've met the same problem and setting CLion to use a lower version system CMake works for me. I'm using ubuntu 16.04, and the system CMake is 3.5.1, whose executable file is located in /usr/bin.
The detailed operation for reference is: in CLion, File --- Settings --- Build, Execution, Deployment --- Toolchains, firstly push the "+" button to create a new toolchain setting called "System", alongside the origin "Default". And in this new "System" toolchain, set the "CMake:" as "Custom CMake Executable" and select the cmake binary from /usr/bin. The make and following C/C++ compilers should be automatically detected.
Save this new toolchain, and come to File --- Settings --- Build, Execution, Deployment ---CMake. After the Build type (which should be RelWithDebInfo as instructed), select the toolchain as newly created "System".
Apply the above operations and the whole system works fine.
Besides, I've also noticed that, if CLion is installed in /opt, this project may not be properly compiled because of the permission issue. But after reinstalling CLion to /home and configure the CMake toolchain to a lower version, everything works fine.
Much thanks! I've met the same problem and setting CLion to use a lower version system CMake works for me. I'm using ubuntu 16.04, and the system CMake is 3.5.1, whose executable file is located in /usr/bin.
The detailed operation for reference is: in CLion, File --- Settings --- Build, Execution, Deployment --- Toolchains, firstly push the "+" button to create a new toolchain setting called "System", alongside the origin "Default". And in this new "System" toolchain, set the "CMake:" as "Custom CMake Executable" and select the cmake binary from /usr/bin. The make and following C/C++ compilers should be automatically detected.
Save this new toolchain, and come to File --- Settings --- Build, Execution, Deployment ---CMake. After the Build type (which should be RelWithDebInfo as instructed), select the toolchain as newly created "System".
Apply the above operations and the whole system works fine.
Besides, I've also noticed that, if CLion is installed in /opt, this project may not be properly compiled because of the permission issue. But after reinstalling CLion to /home and configure the CMake toolchain to a lower version, everything works fine.
I fixed the problem above, but i got another ( i have same environment with yours):
CMake Error in cartographer/CMakeLists.txt:
Specified unknown feature "cxx_std_11" for target
"cartographer.transform.transform_interpolation_buffer_test".
CMake Error in cartographer/CMakeLists.txt:
Specified unknown feature "cxx_std_11" for target
"cartographer.transform.timestamped_transform_test".
....
that means i have too older version of cmake?
UPDATE: I have updated my cmake to 3.8.1 (this version supports C++11) and the problem above is fixed. However, I got anthoer problem again. Luckily, I found the solution according the https://github.com/arvidn/libtorrent/issues/3101#issue-331122261
It‘s a bug with CMake 3.13 bundled with CLion and Catkin, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=915148.
Try setting CLion to use the lower version system CMake, or apply this to your Catkin install: https://github.com/ros/catkin/pull/975/files
Hi, thanks for the link you provided. May I ask how to apply those changes to my catkin install? I have already had catkin installed.
Dear I was trying to run cmake ../ to generate build, I get this problem. CMake Error in cartographer/CMakeLists.txt: Target "cartographer" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/home/zpw/cartographer_superbuild/cartographer/"
which is prefixed in the source directory.
can you find some solution?
Dear I was trying to run cmake ../ to generate build, I get this problem. CMake Error in cartographer/CMakeLists.txt: Target "cartographer" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/home/zpw/cartographer_superbuild/cartographer/"
which is prefixed in the source directory.
can you find some solution?
remove the following statement
Hi,
I was trying to build the code in CLion. However, it gives me the following errors:
The build works in the command line but not in CLion. Can you help me?
Thank you!