File tree 2 files changed +15
-9
lines changed
2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,6 @@ include("${ProjectOptions_SRC_DIR}/DetectCompiler.cmake")
43
43
include ("${ProjectOptions_SRC_DIR} /CrossCompiler.cmake" )
44
44
include ("${ProjectOptions_SRC_DIR} /DynamicProjectOptions.cmake" )
45
45
include ("${ProjectOptions_SRC_DIR} /Hardening.cmake" )
46
-
47
- # Include msvc toolchain on windows if the generator is not visual studio. Should be called before run_vcpkg and run_conan to be effective
48
- if ("${CMAKE_TOOLCHAIN_FILE} " STREQUAL "" )
49
- msvc_toolchain()
50
- else ()
51
- message (STATUS "project_options: skipping msvc_toolchain as CMAKE_TOOLCHAIN_FILE is set" )
52
- endif ()
53
-
54
46
include ("${ProjectOptions_SRC_DIR} /Conan.cmake" )
55
47
include ("${ProjectOptions_SRC_DIR} /Vcpkg.cmake" )
56
48
Original file line number Diff line number Diff line change @@ -46,7 +46,21 @@ function(is_msvc value)
46
46
set (${value} OFF PARENT_SCOPE)
47
47
endfunction ()
48
48
49
- # Include msvc toolchain on windows if the generator is not visual studio. Should be called before run_vcpkg and run_conan to be effective
49
+ #[[.rst:
50
+
51
+ ``msvc_toolchain``
52
+ ===============
53
+
54
+ Include msvc toolchain on windows if the generator is not visual studio. Should be called before run_vcpkg and run_conan to be effective
55
+
56
+ Notes: if running in a cross-compilation situation, the toolchain might not work as expected. So add proper if-checks if you have such a configuration
57
+
58
+ .. code:: cmake
59
+
60
+ msvc_toolchain()
61
+ # should be included before run_vcpkg/run_conan to be effective
62
+
63
+ ]]
50
64
macro (msvc_toolchain)
51
65
if (# if on windows and the generator is not Visual Studio
52
66
WIN32 AND NOT CMAKE_GENERATOR MATCHES "Visual Studio*"
You can’t perform that action at this time.
0 commit comments