We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0320c8a commit 5c47dd5Copy full SHA for 5c47dd5
CMakeLists.txt
@@ -15,7 +15,15 @@ cmake_minimum_required(VERSION 3.10)
15
#
16
# project information
17
18
-project("test" LANGUAGES C Fortran)
+project("test" LANGUAGES C)
19
+
20
+#
21
+# check for Fortran support
22
23
+include(CheckLanguage)
24
+check_language(Fortran)
25
+if(CMAKE_Fortran_COMPILER)
26
+ enable_language(Fortran)
27
28
29
src/CMakeLists.txt
@@ -13,4 +13,7 @@
13
add_subdirectory(libfoo)
14
add_subdirectory(bar)
add_subdirectory(libheader)
-add_subdirectory(fortran)
+ add_subdirectory(fortran)
+endif()
0 commit comments