Cmake_system_processor

Today I came across a problem regarding CMAKESYSTEMPROCESSOR. As I understood platform definition files are supposed to set this value. The documentations says here: On systems that support uname, this variable is set to the output of uname -p, on windows it is set to the value of the environment variable PROCESSORARCHITECTURE. When the CMAKESYSTEMNAME variable is set explicitly to enable cross compiling then the value of CMAKESYSTEMVERSION must also be set explicitly to specify the target system version. In a CMake project, build configurations are stored in a CMakeSettings.json file. When you choose Manage Configurations from the build configuration dropdown in the main toolbar, a dialog appears that shows the default CMake configurations available in Visual Studio. X86 Debug; x86 Clang Debug; x86 Release; x86 Clang Release.

I am using the arm-2008q3 toolchain and having some issues with compiling.

Doing a c++ compile for RT Linux,

I have setup the following in my main CMakeLists.txt

arm-none-linux-gnueabi-g++

cmake_minimum_required(VERSION 3.2)

project(enterprise CXX)

set(CMAKE_SYSTEM_NAME Linux)

set(CMAKE_CXX_COMPILER /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-g++)

set(CMAKE_C_COMPILER /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-gcc)

set(CMAKE_SYSTEM_PROCESSOR arm)

set(CMAKE_AR /opt/toolchains/arm-2008q3/bin/arm-none-linux-gnueabi-ar)

set(CMAKE_FIND_ROOT_PATH /mnt/root)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

set(COMPILE_FLAGS '-lrt -Wall -lpthread')

set(CROSS_COMPILE_INCLUDES /opt/toolchains/arm-2008q3/arm-none-linux-gnueabi/libc/usr/include/linux)

set(LOCAL_PROJECT_HEADER_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/includes)

find_package(Threads)

add_subdirectory(src)

Here is the /src folder CMakeLists.txt

set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}

files.cpp

)

include_directories('../includes')

set_source_files_properties(${SOURCES} PROPERTIES LANGUAGE CXX)

set(VENDOR_LIBRARY mycan.c evgpio.c)

Cmake_system_processor

add_library(vendorLib ${VENDOR_LIBRARY})

set_target_properties(vendorLib PROPERTIES LINKER_LANGUAGE CXX)

add_executable(enterprise ${SOURCES})

target_link_libraries(enterprise vendorLib ${CMAKE_THREAD_LIBS_INIT} pthread event config pcan)

I am able to complete ../cmake, but when I run make, I get the following error:

arm-none-linux-gnueabi-g++: /home/wegunterjr/Documents/projects/Enterprise_Dev_cmake/src: linker input file unused because linking not done

[100%] Linking CXX executable enterprise

arm-none-linux-gnueabi-g++: CMakeFiles/enterprise.dir/..o: No such file or directory

src/CMakeFiles/enterprise.dir/build.make:485: recipe for target 'src/enterprise' failed

make[2]: *** [src/enterprise] Error 1

CMakeFiles/Makefile2:87: recipe for target 'src/CMakeFiles/enterprise.dir/all' failed

make[1]: *** [src/CMakeFiles/enterprise.dir/all] Error 2

Makefile:83: recipe for target 'all' failed

make: *** [all] Error 2

Any thoughts?

Walter E. Gunter, Jr.

Mechatronics Engineer/Roboticist

AGV R&D

Dematic North America

265 S 5200 W

Salt Lake City, UT 84104

801.715.2602

Cmake System Name

Customer Service 1.800.530.9153

DEMATIC lWe Optimize Your Supply Chain www.dematic.com
MATERIAL HANDLING & LOGISTICS CONFERENCE www.mhlc.com

CONFIDENTIALITY NOTICE: This email message and any attachments to it, is intended only for the individual or entity to which it is addressed and may contain confidential material. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, please do not disclose, copy, forward, or retain. If you have received this in error, please contact the sender by reply email and destroy all copies of the original message. ​

CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.

CMake is part of Kitware’s collection of commercially supported open-source platforms for software development.

Contact Us

Have a question about a CMake project? We can help

Training Courses

Book

Get the latest edition of the Mastering CMake book

Netflix

“…CMake, CTest, and CDash have proven to be invaluable tools for us to build multiplatform code, track changes, run tests, and improve code quality by performing code coverage and memory leak analysis.”

Inria

“I am thankful for CMake’s shadow builds feature. For a project like SOFA, which has many optional features and possible option combinations, being able to quickly test a modification on several typical setups on my machine before pushing a significant change to the repository is a very valuable security. This is especially true for a complex project like ours.”

The HDF Group

“CMake, CTest, and CDash were the tools that we desperately needed. With the help of our user community, we added the CMake build system for all HDF products. We rely on CMake for HDF software being successfully built and tested on platforms that range from supercomputers to Windows desktops and tablets.”

ReactOS

“…in early 2010 a decision was made to look for a third party solution instead of continuing to expend time and effort maintaining RBuild. CMake was an early favorite and while the transition was not without its bumps, it has allowed the project to not only increase the number of compilers that could be used to build ReactOS, it also set the stage for significantly decreasing build times, making development faster and easier.”

KDE

“Our working relationship aside, CMake has greatly improved the process of building KDE. Projects using CMake take less time to get started, since there is less time spent fighting with the build system. One KDE developer says, “CMake doesn’t make you want to shoot yourself with a nailgun when building your project anymore.”

Second Life

“A great technology choice that our community helped us make was moving to CMake, a cross-platform build tool, which makes it much simpler to maintain makefiles for many different platforms.”

  • Allegro library
  • Armadillo
  • Avidemux
  • awesome
  • BCI2000
  • Blender
  • BRL-CAD
  • Bullet Physics Engine
  • CGAL
  • Chipmunk physics engine
  • CLion
  • Compiz
  • Conky
  • cURL
  • Deal.II
  • Doomsday Engine
  • Dust Racing 2D
  • Drishti
  • Ettercap
  • Falcon (programming language)
  • FlightGear Flight Simulator
  • GDCM
  • Geant4
  • Gmsh
  • GNU Radio
  • GROMACS
  • Hiawatha (web server)
  • Hypertable
  • Hugin
  • iCub robot and YARP
  • IGSTK
  • ITK
  • KDE SC 4
  • KiCad
  • libpng
  • LAPACK
  • LLVM and Clang
  • LMMS
  • Mir
  • MiKTeX
  • MLPACK
  • MuseScore
  • MySQL and MariaDB
  • OGRE
  • OpenCV
  • OpenCog
  • OpenCPN
  • OpenSceneGraph
  • OpenSync
  • Orthanc
  • Point Cloud Library
  • Poppler

Cmake_system_processor

  • PvPGN
  • QGIS
  • Qt
  • Raw Therapee
  • ReactOS
  • ROOT
  • ROS
  • Ryzom
  • Scribus
  • SDL
  • Second Life
  • SFML
  • Spring RTS
  • SuperTux
  • Synergy
  • Slicer
  • Stellarium
  • Trilinos
  • Vortexje
  • VTK and ParaView
  • VXL
  • zlib
  • PCSX2
  • Zdoom
  • ZeroMQ

CMake 3.20.2 available for download

CMake 3.20.2 is now available for download …

Set(cmake_system_processor Arm)

CMake 3.20.1 available for download

CMake 3.20.1 is now available for download …

CMake 3.19.8 available for download

Cmake Download

CMake 3.19.8 is now available for download …