Put mingw on gcc code path (#16101)
* Supported mingw-w64 * Supported mingw-w64 * Supported mingw-w64
This commit is contained in:
1 parent
87a39fb007
commit
04171416f4
112 files changed
+684
-553
No files matched your search
@@ -54,23 +54,18 @@ set (CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${IE_MAIN_SAMPLES_DIR}/${BIN_FOLDER})
|
||||
set (CMAKE_PDB_OUTPUT_DIRECTORY ${IE_MAIN_SAMPLES_DIR}/${BIN_FOLDER})
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${IE_MAIN_SAMPLES_DIR}/${BIN_FOLDER})
|
||||
|
||||
if (WIN32)
|
||||
set_property (DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS _CRT_SECURE_NO_WARNINGS)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_SCL_SECURE_NO_WARNINGS")
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") # no asynchronous structured exception handling
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qdiag-disable:177")
|
||||
endif()
|
||||
|
||||
# disable some noisy warnings
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251 /wd4275 /wd4267 /wd4819")
|
||||
endif()
|
||||
else()
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -diag-disable:177")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251 /wd4275 /wd4267 /wd4819")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
if(WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qdiag-disable:177")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -diag-disable:177")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <string.h>
|
||||
#include <windef.h>
|
||||
#include <fileapi.h>
|
||||
#include <Winbase.h>
|
||||
#include <winbase.h>
|
||||
#include <sys/stat.h>
|
||||
// clang-format on
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
* @param string directory path
|
||||
* @return pointer to directory data struct element
|
||||
*/
|
||||
static DIR* opendir(const char* dirPath) {
|
||||
inline DIR* opendir(const char* dirPath) {
|
||||
auto dp = new DIR(dirPath);
|
||||
if (!dp->isValid()) {
|
||||
delete dp;
|
||||
@@ -145,7 +145,7 @@ static DIR* opendir(const char* dirPath) {
|
||||
* @param pointer to directory data struct
|
||||
* @return pointer to directory data struct next element
|
||||
*/
|
||||
static struct dirent* readdir(DIR* dp) {
|
||||
inline struct dirent* readdir(DIR* dp) {
|
||||
return dp->nextEnt();
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ static struct dirent* readdir(DIR* dp) {
|
||||
* @param pointer to struct directory data
|
||||
* @return void
|
||||
*/
|
||||
static void closedir(DIR* dp) {
|
||||
inline void closedir(DIR* dp) {
|
||||
delete dp;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user