Cmake set clang1/7/2024 ![]() ![]() ![]() Microsoft (R) Build Engine version 15.7.179.6572 pour. Run Build Command:"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe" "cmTC_097ff.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0" It fails with the following output: Change Dir: C:/Users/ema/Documents/Visual Studio 2017/Projects/CMakeAndroidTest/build/CMakeFiles/CMakeTmp Is not able to compile a simple test program. The C compiler "C:/NVPACK/android-ndk-r15c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe" – Check for working C compiler: C:/NVPACK/android-ndk-r15c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe – brokenĬMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/CMakeTestCCompiler.cmake:52 (message): – Check for working C compiler: C:/NVPACK/android-ndk-r15c/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe Nope, I’m simply unable to create VS projects/solution files:Ĭ:\Users\ema\Documents\Visual Studio 2017\Projects\CMakeAndroidTest\build>cmake … -DCMAKE_TOOLCHAIN_FILE=C:\NVPACK\android-ndk-r15c\build\cmake\ So, rather than trying to refine the toolchain myself, I thought that using the default file provided by Android NDK r15c included with CodeWorks for Android 1R7 would do the trick for me. I’m getting no error, but it’s as if the variables aren’t taken into account. Set(ANDROID_CPP_FEATURES “rtti exceptions”)Ībsolutely no effect (yes, I clean up CMake cache between each CMake run). Now, I’m trying to customize the toolchain, Android API, STL library or RTTI/exceptions support by defining the following variables in CMakeLists.txt: – Build files have been written to: C:/Users/ema/Documents/Visual Studio 2017/Projects/CMakeAndroidTest/build – Check for working CXX compiler: C:/NVPACK/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++.exe – works ![]() ![]() – Check for working CXX compiler: C:/NVPACK/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++.exe – Check for working C compiler: C:/NVPACK/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe – works – Check for working C compiler: C:/NVPACK/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe – The CXX compiler identification is GNU 4.9.0 – The C compiler identification is GNU 4.9.0 If I run CMake from the command-line using the above build environment, I’m getting VS projects/solution files tailored for gcc 4.9, targeting Android 9 API, using gnustl_static STL, without support for RTTI nor exceptions:Ĭ:\Users\ema\Documents\Visual Studio 2017\Projects\CMakeAndroidTest\build>cmake … -G “Visual Studio 15 2017” -DCMAKE_SYSTEM_NAME=Android I’m running latest CodeWorks for Android 1R7.Īdd_executable(cmake-android-test main.cpp) IDE is Visual Studio 2017 Community, version 15.7.3. PATH="C:/Program Files/LLVM/bin C:\Python\Python310\Scripts\ C:\Python\Python310\ C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin C:\Windows\system32 C:\Windows C:\Windows\System32\Wbem C:\Windows\System32\WindowsPowerShell\v1.OS is Windows 10 Professional (64-bit), version 1803, build 17134.48. Here is the CMakeLists.txt I tried: cmake_minimum_required(VERSION 3.20)Īnd the following is the output result with the given preset: Click to expand D:\Test\test-cmake-env-with-set>cmake -preset win32-clang-圆4-ninja-debugĬMAKE_INSTALL_PREFIX:PATH="D:/Test/test-cmake-env-with-set/install/win32-clang-圆4-ninja-debug" WT_SESSION=fd1677eb-c76a-48db-8458-857409bf22cdĪs for the environment of using CMake Tools, I’m not sure how to display.Ĭan you get CMake to run set inside of execute_process or something? First of all, I already installed Clang/LLVM by running the following winget command: winget install LLVM.LLVMĪnd I tried with the following example of CMakePresets.json: Click to expand ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |