diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/CMakeLists.txt | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index eadd6ae5af0..79d87fcf6be 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -147,22 +147,16 @@ SET(CONFIGURE_LINE "Built using CMake") # Also required for mysqlbug, autoconf only supports --version so for now we # just explicitly require GNU -IF(CMAKE_COMPILER_IS_GNUCC) - EXECUTE_PROCESS( - COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} --version - COMMAND sed 1q - OUTPUT_VARIABLE CC_VERSION) -ELSE() - SET(CC_VERSION "") -ENDIF() -IF(CMAKE_COMPILER_IS_GNUCXX) - EXECUTE_PROCESS( - COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version - COMMAND sed 1q - OUTPUT_VARIABLE CXX_VERSION) -ELSE() - SET(CXX_VERSION "") -ENDIF() +EXECUTE_PROCESS( + COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} --version + COMMAND sed 1q + ERROR_QUIET + OUTPUT_VARIABLE CC_VERSION) +EXECUTE_PROCESS( + COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version + COMMAND sed 1q + ERROR_QUIET + OUTPUT_VARIABLE CXX_VERSION) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysqlbug.sh ${CMAKE_CURRENT_BINARY_DIR}/mysqlbug ESCAPE_QUOTES @ONLY) |