|
@@ -1,6 +1,7 @@
|
|
include(CheckLibraryExists)
|
|
include(CheckLibraryExists)
|
|
include(CheckCCompilerFlag)
|
|
include(CheckCCompilerFlag)
|
|
include(CheckCXXCompilerFlag)
|
|
include(CheckCXXCompilerFlag)
|
|
|
|
+include(CheckCSourceCompiles)
|
|
|
|
|
|
if(WIN32 AND NOT MINGW)
|
|
if(WIN32 AND NOT MINGW)
|
|
# NOTE(compnerd) this is technically a lie, there is msvcrt, but for now, lets
|
|
# NOTE(compnerd) this is technically a lie, there is msvcrt, but for now, lets
|
|
@@ -59,6 +60,14 @@ if (LIBCXX_SUPPORTS_NODEFAULTLIBS_FLAG)
|
|
endif ()
|
|
endif ()
|
|
endif ()
|
|
endif ()
|
|
|
|
|
|
|
|
+# Check compiler pragmas
|
|
|
|
+if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
|
|
+ check_c_source_compiles("
|
|
|
|
+#pragma comment(lib, \"c\")
|
|
|
|
+int main() { return 0; }
|
|
|
|
+" LIBCXX_HAS_COMMENT_LIB_PRAGMA)
|
|
|
|
+endif()
|
|
|
|
+
|
|
if(NOT WIN32 OR MINGW)
|
|
if(NOT WIN32 OR MINGW)
|
|
include(CheckLibcxxAtomic)
|
|
include(CheckLibcxxAtomic)
|
|
endif()
|
|
endif()
|
|
@@ -72,7 +81,6 @@ check_cxx_compiler_flag(/EHs- LIBCXX_HAS_NO_EHS_FLAG)
|
|
check_cxx_compiler_flag(/EHa- LIBCXX_HAS_NO_EHA_FLAG)
|
|
check_cxx_compiler_flag(/EHa- LIBCXX_HAS_NO_EHA_FLAG)
|
|
check_cxx_compiler_flag(/GR- LIBCXX_HAS_NO_GR_FLAG)
|
|
check_cxx_compiler_flag(/GR- LIBCXX_HAS_NO_GR_FLAG)
|
|
|
|
|
|
-
|
|
|
|
# Check libraries
|
|
# Check libraries
|
|
if(WIN32 AND NOT MINGW)
|
|
if(WIN32 AND NOT MINGW)
|
|
# TODO(compnerd) do we want to support an emulation layer that allows for the
|
|
# TODO(compnerd) do we want to support an emulation layer that allows for the
|