Skip to content

Commit cf4f9ab

Browse files
committed
Build: Remove genexp in CMake try_compile() flag
This fixes a broken build on windows, and seems like it should not have been working when using Makefile generators on any platform, i.e., macOS & other *nix
1 parent 4e2ab32 commit cf4f9ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ endif()
234234

235235
if(gfortran_compiler)
236236
set(OLD_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
237-
set(CMAKE_REQUIRED_FLAGS $<$<COMPILE_LANGUAGE:Fortran>:-fcoarray=single -ffree-form>)
237+
set(CMAKE_REQUIRED_FLAGS -fcoarray=single)
238238
endif()
239239
include(CheckFortranSourceCompiles)
240240
CHECK_Fortran_SOURCE_COMPILES("
@@ -243,7 +243,8 @@ CHECK_Fortran_SOURCE_COMPILES("
243243
integer :: i
244244
i = this_image()
245245
end program
246-
" Check_Simple_Coarray_Fortran_Source_Compiles)
246+
" Check_Simple_Coarray_Fortran_Source_Compiles
247+
SRC_EXT F90)
247248
if(gfortran_compiler)
248249
set (CMAKE_REQUIRED_FLAGS ${OLD_REQUIRED_FLAGS})
249250
unset(OLD_REQUIRED_FLAGS)

0 commit comments

Comments
 (0)