We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I changed this to build with MinGW:
diff --git a/CMakeLists.txt b/CMakeLists.txt index 71f708f..56223a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,4 +22,4 @@ set(SRC ) add_executable(ClangBuildAnalyzer "${SRC}") target_compile_features(ClangBuildAnalyzer PRIVATE cxx_std_17) -target_link_libraries(ClangBuildAnalyzer -lrt -lpthread) +target_link_libraries(ClangBuildAnalyzer -lpthread) diff --git a/src/main.cpp b/src/main.cpp index 3ef1fc1..68e46d6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -96,7 +96,7 @@ static int RunStart(int argc, const char* argv[]) return 0; } -#ifdef _MSC_VER +#ifdef _WIN32 static time_t FiletimeToTime(const FILETIME& ft) { ULARGE_INTEGER ull; @@ -128,7 +128,7 @@ struct JsonFileFinder if (!cf_get_file_time(f->path, &mtime)) return; time_t fileModTime; -#ifdef _MSC_VER +#ifdef _WIN32 fileModTime = FiletimeToTime(mtime.time); #else fileModTime = mtime.time;
The text was updated successfully, but these errors were encountered:
-lrt was added to the makefile to make it work on some Linux distribution, so I'd rather not remove that...
-lrt
Sorry, something went wrong.
I guess you could use https://cmake.org/cmake/help/latest/module/CheckLinkerFlag.html.
Maybe, but I know nothing about either of: CMake, Linux or MinGW :)
No branches or pull requests
I changed this to build with MinGW:
The text was updated successfully, but these errors were encountered: