I want to set the executable architecture in the CMakeLists.txt file, so I can quickly switch, in a second.įor example, on Linux, where I use gcc, I can just set either set(CMAKE_C_FLAGS -m32)īut unfortunately, the Visual-Studio-Compiler seems to not have such an option. What I can do is set an additional toolchain in the CLion settings, and set the desired toolchain as the default toolchain, but the encompassing slowness is absolutely horrid and not what I want. # set (native_data_types_ARCHITECTURE "圆4")Īdd_executable(native_data_types main.cpp) # set(CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE "圆4") Provides the selected toolchain architecture preference in thisīut whatever I do, it has no effect when I click on run in CLion.ĬMakeLists.txt: cmake_minimum_required(VERSION 3.15) Or host=圆4 value in the CMAKE_GENERATOR_TOOLSET option. The Visual Studio Generators for VS 2013 and above support usingĮither the 32-bit or 64-bit host toolchains by specifying a host=x86 If you are a new contributor, please start with the Getting Started with the LLVM System page. CMake does not build the project, it generates the files needed by your build tool (GNU make, Visual Studio, etc.) for building LLVM. Can we configure cmake to generate ninja build file, which includes both x86 and x8664 definitions Something like: cd project mkdir build cd build cmake. In CLion, how can I set the Visual Studio build architecture in the CMakeLists.txt file ?Īccording to, one can set host=圆4 in the CMAKE_GENERATOR_TOOLSET option. Windows Introduction ¶ CMake is a cross-platform build-generator tool.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |