@@ -73,39 +73,64 @@ function(php_feature_summary_preamble result)
7373 php_feature_summary_preamble_add_item("Zend module API number" "${zendModuleApi} " preamble)
7474 endif ()
7575
76- if (CMAKE_C_COMPILER_LOADED)
77- set (compiler "" )
78- if (CMAKE_C_COMPILER_ID)
79- string (APPEND compiler "${CMAKE_C_COMPILER_ID} " )
80- endif ()
81- if (CMAKE_C_COMPILER_VERSION)
82- string (APPEND compiler " ${CMAKE_C_COMPILER_VERSION} " )
83- endif ()
84- string (STRIP "${compiler} " compiler)
85- if (compiler)
86- string (APPEND compiler " (${CMAKE_C_COMPILER} )" )
87- else ()
88- string (APPEND compiler "${CMAKE_C_COMPILER} " )
76+ get_property (enabledLanguages GLOBAL PROPERTY ENABLED_LANGUAGES )
77+ foreach (language IN ITEMS ${enabledLanguages} )
78+ # Add compiler info.
79+ if (CMAKE_${language} _COMPILER_LOADED)
80+ set (compiler "" )
81+ if (CMAKE_${language} _COMPILER_ID)
82+ string (APPEND compiler "${CMAKE_${language} _COMPILER_ID}" )
83+ endif ()
84+ if (CMAKE_${language} _COMPILER_VERSION)
85+ string (APPEND compiler " ${CMAKE_${language} _COMPILER_VERSION}" )
86+ endif ()
87+ string (STRIP "${compiler} " compiler)
88+ if (compiler)
89+ string (APPEND compiler " (${CMAKE_${language} _COMPILER})" )
90+ else ()
91+ string (APPEND compiler "${CMAKE_${language} _COMPILER}" )
92+ endif ()
93+ php_feature_summary_preamble_add_item(
94+ "${language} compiler"
95+ "${compiler} "
96+ preamble
97+ )
8998 endif ()
90- php_feature_summary_preamble_add_item("C compiler" "${compiler} " preamble)
91- endif ()
9299
93- if (CMAKE_CXX_COMPILER_LOADED)
94- set (compiler "" )
95- if (CMAKE_CXX_COMPILER_ID)
96- string (APPEND compiler "${CMAKE_CXX_COMPILER_ID} " )
97- endif ()
98- if (CMAKE_CXX_COMPILER_VERSION)
99- string (APPEND compiler " ${CMAKE_CXX_COMPILER_VERSION} " )
100- endif ()
101- string (STRIP "${compiler} " compiler)
102- if (compiler)
103- string (APPEND compiler " (${CMAKE_CXX_COMPILER} )" )
104- else ()
105- string (APPEND compiler "${CMAKE_CXX_COMPILER} " )
100+ # Add linker info.
101+ if (CMAKE_${language} _COMPILER_LINKER)
102+ set (linker "" )
103+ if (CMAKE_${language} _COMPILER_LINKER_ID)
104+ string (APPEND linker "${CMAKE_${language} _COMPILER_LINKER_ID}" )
105+ endif ()
106+ if (CMAKE_${language} _COMPILER_LINKER_VERSION)
107+ string (APPEND linker " ${CMAKE_${language} _COMPILER_LINKER_VERSION}" )
108+ endif ()
109+ string (STRIP "${linker} " linker)
110+ if (linker)
111+ string (APPEND linker " (${CMAKE_${language} _COMPILER_LINKER})" )
112+ else ()
113+ string (APPEND linker "${CMAKE_${language} _COMPILER_LINKER}" )
114+ endif ()
115+ php_feature_summary_preamble_add_item(
116+ "${language} linker"
117+ "${linker} "
118+ preamble
119+ )
106120 endif ()
107- php_feature_summary_preamble_add_item("CXX compiler" "${compiler} " preamble)
108- endif ()
121+ endforeach ()
122+
123+ php_feature_summary_preamble_add_item(
124+ "CMake version"
125+ "${CMAKE_VERSION} "
126+ preamble
127+ )
128+
129+ php_feature_summary_preamble_add_item(
130+ "CMake generator"
131+ "${CMAKE_GENERATOR} "
132+ preamble
133+ )
109134
110135 get_property (isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
111136 if (isMultiConfig)
0 commit comments