test cases/cmake/16 threads/subprojects/cmMod/cmMod.hpp
raw| 1 | #pragma once |
| 2 | |
| 3 | #if defined _WIN32 || defined __CYGWIN__ |
| 4 | #define DLL_PUBLIC __declspec(dllexport) |
| 5 | #else |
| 6 | #if defined __GNUC__ |
| 7 | #define DLL_PUBLIC __attribute__((visibility("default"))) |
| 8 | #else |
| 9 | #pragma message("Compiler does not support symbol visibility.") |
| 10 | #define DLL_PUBLIC |
| 11 | #endif |
| 12 | #endif |
| 13 | |
| 14 | class DLL_PUBLIC CmMod { |
| 15 | private: |
| 16 | int num = 0; |
| 17 | |
| 18 | public: |
| 19 | inline int getNum() const { return num; } |
| 20 | void asyncIncrement(); |
| 21 | }; |