Update CMake files to support Windows platform#1003
Conversation
|
Note: I had planned to submit a PR to update the CMake files after the current PRs are merged. I'd like to wait until the runtime and pgmath PRs are merged, then I can see where we are. |
|
On windows if you are building with clang with MSVC ABI |
Yes, you're right. I tested with clang for windows. It seems It was a side effect of my built clang (I don't know why). I dropped that change. Thanks for the comment. |
@xoviat sorry, I think it would be nice to enable the basic build, maybe it makes the review process easier. In my opinion it could be merge independently of the other Windows changes, of course if you and others agree with that. |
| SET(CMAKE_Fortran_COMPILER_WORKS 1) | ||
| SET(CMAKE_Fortran_ABI_COMPILED 0) | ||
| SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1) | ||
| SET(CMAKE_Fortran_MODDIR_FLAG "-J ") |
There was a problem hiding this comment.
Do you run CMake with -DCMAKE_Fortran_COMPILER_ID=Flang? That should set CMAKE_Fortran_MODDIR_FLAG correctly.
| Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/include-static | ||
| ) | ||
| if (MSVC) | ||
| set_property(TARGET flang_static PROPERTY OUTPUT_NAME libflang) |
| @@ -1,3 +1,4 @@ | |||
|
|
|||
|
|
||
| add_flang_library(ompstub_static ${OMPSTUB_SRC}) | ||
| if (MSVC) | ||
| set_property(TARGET ompstub_static PROPERTY OUTPUT_NAME libompstub) |
There was a problem hiding this comment.
Please indent this line and line 13.
This PR aims to enable the build for Windows x64. Windows port of Flang is not ready yet, but it would be nice if anybody could run a build and check the current status.
This PR is created based on #464, since there is no any activity on that that's why I opened a new one.