Skip to content

Commit f9808af

Browse files
committed
uid: windows linking
1 parent 61c0177 commit f9808af

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ supports F2018 standard `C_BOOL` if `nvfortran -Munixlogical` is used.
9292
> The logical constants .TRUE. and .FALSE. are defined to be the four-byte values -1 and 0 respectively.
9393
A logical expression is defined to be .TRUE. if its least significant bit is 1 and .FALSE. otherwise.
9494

95-
Example output, Fortran interfacing with C or C++
95+
#### Example output, Fortran interfacing with C or C++
9696

97-
* Intel oneAPI 2023 without `-fpscomp logicals`
97+
* Intel oneAPI 2023..2026 (Linux or Windows) without `-fpscomp logicals`
9898
* NVHPC 2023.5 without `-Munixlogical`
9999

100100
```
@@ -108,8 +108,8 @@ Example output, Fortran interfacing with C or C++
108108
C_BOOL: 8 0 FF
109109
```
110110

111-
* Intel oneAPI 2023 with `-fpscomp logicals`
112-
* NVHPC 2023.5 with `-Munixlogical`
111+
* Intel oneAPI with `-fpscomp logicals`
112+
* NVHPC with `-Munixlogical`
113113

114114
```
115115
logical_not(T): F

test/uid/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
set_property(DIRECTORY PROPERTY LABELS uid)
22

3-
add_executable(getuid getuid.f90 ${PROJECT_SOURCE_DIR}/src/uid/uid.cpp)
3+
add_library(uid_cpp OBJECT ${PROJECT_SOURCE_DIR}/src/uid/uid.cpp)
4+
target_link_libraries(uid_cpp PUBLIC $<$<BOOL:${WIN32}>:Advapi32>)
5+
6+
add_executable(getuid getuid.f90)
7+
target_link_libraries(getuid PRIVATE uid_cpp)
48
set_property(TARGET getuid PROPERTY LINKER_LANGUAGE ${linker_lang})
59

610
add_test(NAME GetUID COMMAND getuid)

0 commit comments

Comments
 (0)