CMake configuration error "Current configuration mixes up CLang and MSVC"
-
The current configuration mixes Clang and MSVC or some other CL compatible compiler tool. This is not supported. Use either clang or MSVC as both C and C compilers. C:/Program Files/CMake/share/cmake-3.19/Modules/Platform/Windows-Clang-C.cmake:1 (include) C:/Program Files/CMake/share/cmake-3.19/Modules/CMakeCInformation.cmake:48 (include) CMakeLists.txt:3 (project)
Can someone help me identify the solution to resolve this problem
Thanks in advance!
-
The current configuration mixes Clang and MSVC or some other CL compatible compiler tool. This is not supported. Use either clang or MSVC as both C and C compilers. C:/Program Files/CMake/share/cmake-3.19/Modules/Platform/Windows-Clang-C.cmake:1 (include) C:/Program Files/CMake/share/cmake-3.19/Modules/CMakeCInformation.cmake:48 (include) CMakeLists.txt:3 (project)
Can someone help me identify the solution to resolve this problem
Thanks in advance!
@Dharani-Prasad The error message says what the problem is.
But to find out why this happens you will have to provide more information. For example: how you call cmake (parameters), your CMakeLists.txt files. -
@Dharani-Prasad The error message says what the problem is.
But to find out why this happens you will have to provide more information. For example: how you call cmake (parameters), your CMakeLists.txt files.@jsulm Here is my CMakeLists.txt
cmake_minimum_required(VERSION 3.5) project("projectName") #Modules add_subdirectory(src/Module1/Module1.1) add_subdirectory(src/Module1/Module1.2) add_subdirectory(src/Module1/Module1.3) add_subdirectory(src/Module2/Module2.1) add_subdirectory(src/Module3/Module3.1) add_subdirectory(src/Module4/Module4.1) add_subdirectory(src/Module5/Module5.1) add_subdirectory(src/Module6/Module6.1) add_subdirectory(src/Module7/Module7.1) #excutable add_subdirectory(src/excutableModule)
-
@jsulm Here is my CMakeLists.txt
cmake_minimum_required(VERSION 3.5) project("projectName") #Modules add_subdirectory(src/Module1/Module1.1) add_subdirectory(src/Module1/Module1.2) add_subdirectory(src/Module1/Module1.3) add_subdirectory(src/Module2/Module2.1) add_subdirectory(src/Module3/Module3.1) add_subdirectory(src/Module4/Module4.1) add_subdirectory(src/Module5/Module5.1) add_subdirectory(src/Module6/Module6.1) add_subdirectory(src/Module7/Module7.1) #excutable add_subdirectory(src/excutableModule)
@Dharani-Prasad Well, in that one is nothing apparent. But you have many add_subdirectory, so you should check these also.
And you did not say how you're calling CMake... -
@Dharani-Prasad Well, in that one is nothing apparent. But you have many add_subdirectory, so you should check these also.
And you did not say how you're calling CMake...@jsulm said in CMake configuration error "Current configuration mixes up CLang and MSVC":
And you did not say how you're calling CMake...
This is crucial, you probably just need to specify the correct generator.
In any case it looks like yourPATH
is well polluted which is never great