Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9179805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:53:32+00:00 2026-06-17T17:53:32+00:00

CMake version 2.8.9 I am writing an app for Windows 8 to run on

  • 0

CMake version 2.8.9

I am writing an app for Windows 8 to run on tablets. I have written an underlying C++ library that contains the majority of my application logic. I am using CMake to compile this C++ library because I want to have a platform-independent build system for future ports.

When I run cmake.exe from the command line or use cmake-gui, I can generate projects using the “Visual Studio 11” and “Visual Studio 11 Win64” generators. However, when I try to use the “Visual Studio 11 ARM” generator I get the following error:

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "cl" is not able to compile a simple test program.

The cause is in the more detailed output:

1>------ Build started: Project: cmTryCompileExec2764216458, Configuration: Debug ARM ------

1>C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\ARM\PlatformToolsets\v110\Microsoft.Cpp.ARM.v110.targets(36,5):
error MSB8022: Compiling Desktop applications for the ARM platform is not supported.

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

It appears that by default the “Visual Studio 11 ARM” generator doesn’t work because cl.exe will not allow CMake to test the compiler.

I’ve read that I can turn off compiler checks altogether but that sounds like a poor choice. Is this just a bug in CMake?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:53:33+00:00Added an answer on June 17, 2026 at 5:53 pm

    Sorry, I should have posted the workaround I used.

    Instead of using the ‘Visual Studio 11 ARM’ generator, I switched to NMake and was able to get it working. The guys over at CMake will probably fix the Visual Studio generator in their 2.8.11 release.

    The trick to using NMake to build for ARM is just to run the batch script that sets up your environment to cross-compile before invoking cmake. Or, you could also just open “VS2012 ARM Cross Tools Command Prompt”. The batch script is located at:

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_arm\vcvarsx86_arm.bat

    The command line I used for cmake was:

    cmake -D “CMAKE_BUILD_TYPE=Debug” -G “NMake Makefiles” “path-to-CMakeLists.txt”

    You can substitute “Release” for “Debug” of course. I think everyone should do out of source builds, but you can run the command in the same directory as your CMakeLists.txt and omit the last parameter.

    In order to build successfully, you will need to set the following in your CMakeLists.txt:

    SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE" )
    SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE" )
    

    If you are building for multiple platforms, a good way that I found to detect that I was building for ARM to set the above variables was to check the environment:

    STRING( TOLOWER "$ENV{Platform}" generator )
    IF( generator STREQUAL "arm" )
    

    I don’t think this last part is necessary, but I noticed that there are a lot of standard libraries missing in the ARM SDK, so I setup the libraries to exclude everything that is unavailable by setting the following:

    SET( CMAKE_C_STANDARD_LIBRARIES "kernel32.lib user32.lib ole32.lib oleaut32.lib uuid.lib advapi32.lib" 
         CACHE STRING "Libraries linked by default with all C applications." FORCE )
    SET( CMAKE_CXX_STANDARD_LIBRARIES "kernel32.lib user32.lib ole32.lib oleaut32.lib uuid.lib advapi32.lib"
         CACHE STRING "Libraries linked by default with all C++ applications." FORCE )
    

    When you’re all finished, just run:

    nmake
    

    Anyway, this worked for me. I don’t think I had to do anything else to get it working for my particular project. Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to compile libaws (http://sourceforge.net/projects/libaws/) library in Windows using cmake. I have
I have a simple project going that uses CMake and gtest. I have a
I've got a project managed by CMake with multiple libraries that have link time
I'm having a link error under cmake that I don't have when compiling on
I have some huge project that is being compiled in CMake. It is developed
I'm attempting to run a cmake hello world program on Windows 7 x64 with
I have written a c++ library, and I'm trying to make python bindings to
How do I achieve the following in CMake (using version 2.8.5)? I have documentation
I have a fortran code build that uses cmake to build. This is currently
I'm using CMake. My application uses DLL version of wxWidgets. I'm outputing the apllication's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.