small tweaks and fixes for compiling with MSVC++
This commit is contained in:
@ -97,9 +97,11 @@ if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 14))
|
|||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
|
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
|
||||||
# ugly hack for MSVC which by default always reports an old C++ standard in the __cplusplus macro
|
# ugly hacks for MSVC which by default always reports an old C++ standard in the __cplusplus macro
|
||||||
|
# and prints lots of pointless warnings about "unsafe" functions
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_compile_options(/Zc:__cplusplus)
|
add_compile_options(/Zc:__cplusplus)
|
||||||
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# export all symbols when building a .dll file on windows
|
# export all symbols when building a .dll file on windows
|
||||||
|
|||||||
@ -196,7 +196,7 @@ Dump::~Dump()
|
|||||||
|
|
||||||
if (multifile == 0 && fp != nullptr) {
|
if (multifile == 0 && fp != nullptr) {
|
||||||
if (compressed) {
|
if (compressed) {
|
||||||
if (filewriter) pclose(fp);
|
if (filewriter) platform::pclose(fp);
|
||||||
} else {
|
} else {
|
||||||
if (filewriter) fclose(fp);
|
if (filewriter) fclose(fp);
|
||||||
}
|
}
|
||||||
@ -518,7 +518,7 @@ void Dump::write()
|
|||||||
|
|
||||||
if (multifile) {
|
if (multifile) {
|
||||||
if (compressed) {
|
if (compressed) {
|
||||||
if (filewriter && fp != nullptr) pclose(fp);
|
if (filewriter && fp != nullptr) platform::pclose(fp);
|
||||||
} else {
|
} else {
|
||||||
if (filewriter && fp != nullptr) fclose(fp);
|
if (filewriter && fp != nullptr) fclose(fp);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user