Skip to content

Commit

Permalink
Pass essential CMake vars to dependent projects
Browse files Browse the repository at this point in the history
Use mark_as_superbuild to pass generator, platform info etc. This will
partial solve Issue UCL#14 (but only for dependencies that build via CMake).
  • Loading branch information
Kris Thielemans committed Jul 2, 2017
1 parent f78ca41 commit 733a359
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ set(EXTERNAL_PROJECT_BUILD_TYPE "Release" CACHE STRING "Default build type for s
set_property(CACHE EXTERNAL_PROJECT_BUILD_TYPE PROPERTY
STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")

# Make sure that some CMake variables are passed to all dependencies
mark_as_superbuild(
PROJECTS ALL_PROJECTS
VARS CMAKE_GENERATOR:STRING CMAKE_GENERATOR_PLATFORM:STRING CMAKE_GENERATOR_TOOLSET:STRING
CMAKE_C_COMPILER:FILEPATH CMAKE_CXX_COMPILER:FILEPATH
CMAKE_INSTALL_PREFIX:PATH
)


set(MATLAB_ROOT CACHE PATH "Path to Matlab root directory")

Expand Down

0 comments on commit 733a359

Please sign in to comment.