Skip to content

Commit 024c860

Browse files
committed
Solve minor bugs in error messages and windows msvc compiler target for NodeJS.
1 parent ab142fb commit 024c860

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

cmake/FindNodeJS.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,15 @@ if(NOT NodeJS_LIBRARY)
373373
set(NodeJS_COMPILE_ARCH "x64")
374374
endif()
375375

376-
# Check vs2017 or vs2015 (TODO: Add more versions if they are supported by NodeJS)
377-
if(MSVC_VERSION EQUAL 1900)
378-
set(NodeJS_MSVC_VER vs2015)
376+
# Check for Visual Studio Version and configure the build command
377+
if(MSVC_VERSION GREATER 1916)
378+
set(NodeJS_MSVC_VER vs2019)
379379
elseif(MSVC_VERSION GREATER 1900)
380380
set(NodeJS_MSVC_VER vs2017)
381+
elseif(MSVC_VERSION EQUAL 1900)
382+
set(NodeJS_MSVC_VER vs2015)
383+
else()
384+
message(FATAL_ERROR "Version of Visual Studio too old, add other toolsets in FindNodeJS.cmake in order to support them")
381385
endif()
382386

383387
if(CMAKE_BUILD_TYPE STREQUAL "Debug")

source/backtrace/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if(UNIX)
4242
elseif(WIN32)
4343
set(BACKTRACE_IMPL win32)
4444
else()
45-
message(ERROR "Backtrace library not supported in this platform")
45+
message(FATAL_ERROR "Backtrace library not supported in this platform")
4646
endif()
4747

4848
set(sources

0 commit comments

Comments
 (0)