diff options
author | Ladislav Zezula <ladislav.zezula@avast.com> | 2021-05-15 18:33:19 +0200 |
---|---|---|
committer | Ladislav Zezula <ladislav.zezula@avast.com> | 2021-05-15 18:33:19 +0200 |
commit | 94e32487c14d75d63618a8b617dcfe4673f5c34c (patch) | |
tree | 1a966842641c5ba9ba117532dde4d3cc229818fb | |
parent | 013b12f860ccb2e418bb10766c57fcc18b7b966a (diff) |
Added C++11 support in MAKEFILE
-rw-r--r-- | CMakeLists.txt | 11 | ||||
-rw-r--r-- | src/FileStream.cpp | 2 | ||||
-rw-r--r-- | src/StormPort.h | 6 |
3 files changed, 8 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bd8d336..a44170c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,9 @@ project(StormLib) cmake_minimum_required(VERSION 2.8.12) set(LIBRARY_NAME storm) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_CXX_STANDARD_REQUIRED ON) include(CMakeDependentOption) @@ -330,10 +333,10 @@ else() endif() if (NOT STORM_SKIP_INSTALL) - install(TARGETS ${LIBRARY_NAME} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib + install(TARGETS ${LIBRARY_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib FRAMEWORK DESTINATION /Library/Frameworks PUBLIC_HEADER DESTINATION include INCLUDES DESTINATION include) diff --git a/src/FileStream.cpp b/src/FileStream.cpp index a3c8e9b..2266518 100644 --- a/src/FileStream.cpp +++ b/src/FileStream.cpp @@ -34,7 +34,7 @@ // Local functions - platform-specific functions
#ifndef STORMLIB_WINDOWS
-static THREAD_LOCAL DWORD nLastError = ERROR_SUCCESS;
+static thread_local DWORD nLastError = ERROR_SUCCESS;
DWORD GetLastError()
{
diff --git a/src/StormPort.h b/src/StormPort.h index ec9fc07..d386414 100644 --- a/src/StormPort.h +++ b/src/StormPort.h @@ -277,8 +277,6 @@ #define STORMLIB_LITTLE_ENDIAN #endif - #define THREAD_LOCAL thread_local - // Platforms with mmap support #if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) #include <sys/mman.h> @@ -395,10 +393,6 @@ #define _countof(x) (sizeof(x) / sizeof(x[0])) #endif -#ifndef THREAD_LOCAL - #define THREAD_LOCAL -#endif - //----------------------------------------------------------------------------- // Swapping functions |