Skip to content

Commit da092fc

Browse files
committed
post-merge minor updates
1 parent 322998d commit da092fc

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NBL_ROOT_PATH}/cmake" CACHE PATH "
6767
get_property(NBL_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
6868

6969
include(common)
70-
#import .vsconfig file with VS components required for Nabla
71-
if(WIN32 AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
72-
option(NBL_ENABLE_VS_CONFIG_IMPORT "" OFF)
70+
71+
option(NBL_ENABLE_VS_CONFIG_IMPORT "Request import of .vsconfig file with VS components required to build Nabla" OFF)
72+
73+
if(NBL_ENABLE_VS_CONFIG_IMPORT)
7374
NBL_IMPORT_VS_CONFIG()
7475
endif()
7576

cmake/common.cmake

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,9 +1301,8 @@ macro(NBL_GET_ALL_TARGETS_RECURSIVE NBL_TARGETS NBL_DIRECTORY)
13011301
endmacro()
13021302

13031303
function(NBL_IMPORT_VS_CONFIG)
1304-
if(NBL_ENABLE_VS_CONFIG_IMPORT)
1305-
message(STATUS "NOTICE: Configuration will continue after Visual Studio Installer is closed.")
1306-
message(STATUS "To disable VS config import disable the NBL_IMPORT_VS_CONFIG option.")
1304+
if(WIN32 AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
1305+
message(STATUS "Requesting import of .vsconfig file! Configuration will continue after Visual Studio Installer is closed.")
13071306
set(NBL_DEVENV_ISOLATION_INI_PATH "${CMAKE_GENERATOR_INSTANCE}/Common7/IDE/devenv.isolation.ini")
13081307
file(READ ${NBL_DEVENV_ISOLATION_INI_PATH} NBL_DEVENV_ISOLATION_INI_CONTENT)
13091308
string(REPLACE "/" "\\" NBL_VS_INSTALLATION_PATH ${CMAKE_GENERATOR_INSTANCE})
@@ -1312,11 +1311,14 @@ function(NBL_IMPORT_VS_CONFIG)
13121311

13131312
execute_process(COMMAND "${NBL_VS_INSTALLER_PATH}" modify --installPath "${NBL_VS_INSTALLATION_PATH}" --config "${NBL_ROOT_PATH}/.vsconfig" --allowUnsignedExtensions
13141313
ERROR_VARIABLE vsconfig_error
1315-
RESULT_VARIABLE vsconfig_result)
1314+
RESULT_VARIABLE vsconfig_result
1315+
)
13161316

13171317
if(NOT vsconfig_result EQUAL 0)
13181318
message(FATAL_ERROR "Visual Studio Installer error: ${vsconfig_error}")
13191319
endif()
1320-
1320+
else()
1321+
message(FATAL_ERORR "Cannot request importing VS config, doesn't meet requirements!")
13211322
endif()
1323+
13221324
endfunction()

0 commit comments

Comments
 (0)