Skip to content
Snippets Groups Projects
Commit d5fa482c authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Feat: setup vc environment during configuration

This would allow us to build using ninja from the command line.
This is currently not possible as CMake cannot find `cl` when building from a "normal" shell.
The vcvarsall script would have to be called before.
This is very inconvenient.
With this change the vc environment would be setup during configuration.
However, as discussed [here](https://github.com/MarkSchofield/WindowsToolchain/issues/58) this does not work correctly yet.
parent 640eaca7
No related branches found
No related tags found
1 merge request!3Draft: Feat: setup VC environment during configuration
...@@ -48,3 +48,18 @@ macro (find_package) ...@@ -48,3 +48,18 @@ macro (find_package)
# message (FATAL_ERROR "Package ${ARGV0} found as a Target; skip find_package") # message (FATAL_ERROR "Package ${ARGV0} found as a Target; skip find_package")
# endif () # endif ()
endmacro () endmacro ()
CPMAddPackage (
NAME project_options
GITHUB_REPOSITORY aminya/project_options
VERSION 0.36.4
DOWNLOAD_ONLY YES
)
include (${project_options_SOURCE_DIR}/src/VCEnvironment.cmake)
if ("${CMAKE_TOOLCHAIN_FILE}" STREQUAL "")
msvc_toolchain ()
else ()
message (STATUS "project_options: skipping msvc_toolchain as CMAKE_TOOLCHAIN_FILE is set")
endif ()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment