1include(CheckLibraryExists)
2include(CheckCXXCompilerFlag)
3
4# Check compiler flags
5
6check_cxx_compiler_flag(/WX                     LIBCXX_HAS_WX_FLAG)
7check_cxx_compiler_flag(/WX-                    LIBCXX_HAS_NO_WX_FLAG)
8check_cxx_compiler_flag(/EHsc                   LIBCXX_HAS_EHSC_FLAG)
9check_cxx_compiler_flag(/EHs-                   LIBCXX_HAS_NO_EHS_FLAG)
10check_cxx_compiler_flag(/EHa-                   LIBCXX_HAS_NO_EHA_FLAG)
11check_cxx_compiler_flag(/GR-                    LIBCXX_HAS_NO_GR_FLAG)
12
13
14# Check libraries
15check_library_exists(pthread pthread_create "" LIBCXX_HAS_PTHREAD_LIB)
16check_library_exists(c printf "" LIBCXX_HAS_C_LIB)
17check_library_exists(m ccos "" LIBCXX_HAS_M_LIB)
18check_library_exists(rt clock_gettime "" LIBCXX_HAS_RT_LIB)
19check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXX_HAS_GCC_S_LIB)
20
21