diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b39260..04df796 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,17 +122,18 @@ endif() # ========================================================================== # INCLUDE (${g3log_SOURCE_DIR}/CPackLists.txt) - -MESSAGE("\n\n - ******************************************************************* - Please do 'make clean-cmake' before next cmake generation. - It is a good idea to purge your build directory of CMake - generated cache files - ******************************************************************* - ") -add_custom_target(clean-cmake - COMMAND ${CMAKE_COMMAND} -P ${g3log_SOURCE_DIR}/CleanAll.cmake -) +IF (NOT MSVC) + MESSAGE("\n\n + ******************************************************************* + Please do 'make clean-cmake' before next cmake generation. + It is a good idea to purge your build directory of CMake + generated cache files + ******************************************************************* + ") + add_custom_target(clean-cmake + COMMAND ${CMAKE_COMMAND} -P ${g3log_SOURCE_DIR}/CleanAll.cmake + ) +ENDIF() diff --git a/example/main_fatal_choice.cpp b/example/main_fatal_choice.cpp index abbfb16..004532f 100644 --- a/example/main_fatal_choice.cpp +++ b/example/main_fatal_choice.cpp @@ -18,6 +18,11 @@ #include #include +#ifndef _MSC_VER +#define NOEXCEPT noexcept +#else +#define NOEXCEPT throw() +#endif namespace { @@ -116,7 +121,7 @@ namespace using deathfunc = void (*) (void); - void Death_x10000(deathfunc func, std::string funcname) noexcept { + void Death_x10000(deathfunc func, std::string funcname) NOEXCEPT { LOG(DEBUG) << " trigger exit"; std::vector> asyncs; asyncs.reserve(10000); @@ -132,7 +137,7 @@ namespace } - void Throw() noexcept { + void Throw() NOEXCEPT { LOG(DEBUG) << " trigger exit"; std::future empty; empty.get(); @@ -141,7 +146,7 @@ namespace } - void SegFaultAttempt_x10000() noexcept { + void SegFaultAttempt_x10000() NOEXCEPT { deathfunc f = []{Throw(); *(char*)0 = 0; char* ptr = 0; *ptr = 1; AccessViolation();}; Death_x10000(f, "throw uncaught exception... and then some sigsegv calls"); }