I want to create my sources using the Mingw compiler, which was not placed on my PATH system. I tried this at the beginning of my script:
set(Env{PATH} "c:/MyProject/Tools/mingw/bin/" "c:/MyProject/Tools/mingw/msys/1.0/bin/")
And this:
set(CMAKE_PROGRAM_PATH "c:/MyProject/Tools/mingw/bin/" "c:/MyProject/Tools/mingw/msys/1.0/bin/") set(CMAKE_LIBRARY_PATH "c:/MyProject/Tools/mingw/bin/" "c:/MyProject/Tools/mingw/msys/1.0/bin/") set(CMAKE_SYSTEM_PROGRAM_PATH "c:/MyProject/Tools/mingw/bin/" "c:/MyProject/Tools/mingw/msys/1.0/bin/") set(CMAKE_SYSTEM_PREFIX_PATH "c:/MyProject/Tools/mingw/bin/" "c:/MyProject/Tools/mingw/msys/1.0/bin/")
The first option does not work at all. Suppose I cannot overwrite the value of an environment variable in a CMake script. The second script finds my mingw compiler, but it catches an error when gcc starts (cannot find libgmp-10.dll, which gcc needs). This is because the PATH variable is not configured on my Mingw.
cmake
Aleksei Sep 28 2018-11-11T00: 00Z
source share