diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeTestCCompiler.cmake | 5 | ||||
-rw-r--r-- | Modules/CMakeTestCSharpCompiler.cmake | 5 | ||||
-rw-r--r-- | Modules/CMakeTestCUDACompiler.cmake | 5 | ||||
-rw-r--r-- | Modules/CMakeTestCXXCompiler.cmake | 5 | ||||
-rw-r--r-- | Modules/CMakeTestFortranCompiler.cmake | 5 | ||||
-rw-r--r-- | Modules/CMakeTestSwiftCompiler.cmake | 5 | ||||
-rw-r--r-- | Modules/Compiler/PGI-Fortran.cmake | 1 | ||||
-rw-r--r-- | Modules/Compiler/PGI.cmake | 12 | ||||
-rw-r--r-- | Modules/Platform/FreeBSD-Determine-CXX.cmake | 3 |
9 files changed, 29 insertions, 17 deletions
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index 7f19969..e34ae75 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -48,9 +48,10 @@ if(NOT CMAKE_C_COMPILER_WORKS) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the C compiler works failed with " "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n") - message(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" " + string(REPLACE "\n" "\n " _output "${__CMAKE_C_COMPILER_OUTPUT}") + message(FATAL_ERROR "The C compiler\n \"${CMAKE_C_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " - "with the following output:\n ${__CMAKE_C_COMPILER_OUTPUT}\n\n" + "with the following output:\n ${_output}\n\n" "CMake will not be able to correctly generate this project.") else() if(C_TEST_WAS_RUN) diff --git a/Modules/CMakeTestCSharpCompiler.cmake b/Modules/CMakeTestCSharpCompiler.cmake index 1a8bf32..f3b95fd 100644 --- a/Modules/CMakeTestCSharpCompiler.cmake +++ b/Modules/CMakeTestCSharpCompiler.cmake @@ -42,9 +42,10 @@ if(NOT CMAKE_CSharp_COMPILER_WORKS) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the C# compiler works failed with " "the following output:\n${__CMAKE_CSharp_COMPILER_OUTPUT}\n\n") - message(FATAL_ERROR "The C# compiler \"${CMAKE_CSharp_COMPILER}\" " + string(REPLACE "\n" "\n " _output "${__CMAKE_CSharp_COMPILER_OUTPUT}") + message(FATAL_ERROR "The C# compiler\n \"${CMAKE_CSharp_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " - "with the following output:\n ${__CMAKE_CSharp_COMPILER_OUTPUT}\n\n" + "with the following output:\n ${_output}\n\n" "CMake will not be able to correctly generate this project.") else() if(CSharp_TEST_WAS_RUN) diff --git a/Modules/CMakeTestCUDACompiler.cmake b/Modules/CMakeTestCUDACompiler.cmake index 80113cb..df5ec72 100644 --- a/Modules/CMakeTestCUDACompiler.cmake +++ b/Modules/CMakeTestCUDACompiler.cmake @@ -42,9 +42,10 @@ if(NOT CMAKE_CUDA_COMPILER_WORKS) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the CUDA compiler works failed with " "the following output:\n${__CMAKE_CUDA_COMPILER_OUTPUT}\n\n") - message(FATAL_ERROR "The CUDA compiler \"${CMAKE_CUDA_COMPILER}\" " + string(REPLACE "\n" "\n " _output "${__CMAKE_CUDA_COMPILER_OUTPUT}") + message(FATAL_ERROR "The CUDA compiler\n \"${CMAKE_CUDA_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " - "with the following output:\n ${__CMAKE_CUDA_COMPILER_OUTPUT}\n\n" + "with the following output:\n ${_output}\n\n" "CMake will not be able to correctly generate this project.") else() if(CUDA_TEST_WAS_RUN) diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index a31067b..7b80dc0 100644 --- a/Modules/CMakeTestCXXCompiler.cmake +++ b/Modules/CMakeTestCXXCompiler.cmake @@ -41,9 +41,10 @@ if(NOT CMAKE_CXX_COMPILER_WORKS) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the CXX compiler works failed with " "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n") - message(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" " + string(REPLACE "\n" "\n " _output "${__CMAKE_CXX_COMPILER_OUTPUT}") + message(FATAL_ERROR "The C++ compiler\n \"${CMAKE_CXX_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " - "with the following output:\n ${__CMAKE_CXX_COMPILER_OUTPUT}\n\n" + "with the following output:\n ${_output}\n\n" "CMake will not be able to correctly generate this project.") else() if(CXX_TEST_WAS_RUN) diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake index c81694e..3c150a8 100644 --- a/Modules/CMakeTestFortranCompiler.cmake +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -41,9 +41,10 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran compiler works failed with " "the following output:\n${OUTPUT}\n\n") - message(FATAL_ERROR "The Fortran compiler \"${CMAKE_Fortran_COMPILER}\" " + string(REPLACE "\n" "\n " _output "${OUTPUT}") + message(FATAL_ERROR "The Fortran compiler\n \"${CMAKE_Fortran_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " - "with the following output:\n ${OUTPUT}\n\n" + "with the following output:\n ${_output}\n\n" "CMake will not be able to correctly generate this project.") else() if(FORTRAN_TEST_WAS_RUN) diff --git a/Modules/CMakeTestSwiftCompiler.cmake b/Modules/CMakeTestSwiftCompiler.cmake index 6393f44..bcd5c33 100644 --- a/Modules/CMakeTestSwiftCompiler.cmake +++ b/Modules/CMakeTestSwiftCompiler.cmake @@ -39,9 +39,10 @@ if(NOT CMAKE_Swift_COMPILER_WORKS) file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Swift compiler works failed with " "the following output:\n${__CMAKE_Swift_COMPILER_OUTPUT}\n\n") - message(FATAL_ERROR "The Swift compiler \"${CMAKE_Swift_COMPILER}\" " + string(REPLACE "\n" "\n " _output "${__CMAKE_Swift_COMPILER_OUTPUT}") + message(FATAL_ERROR "The Swift compiler\n \"${CMAKE_Swift_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " - "with the following output:\n ${__CMAKE_Swift_COMPILER_OUTPUT}\n\n" + "with the following output:\n ${_output}\n\n" "CMake will not be able to correctly generate this project.") else() if(Swift_TEST_WAS_RUN) diff --git a/Modules/Compiler/PGI-Fortran.cmake b/Modules/Compiler/PGI-Fortran.cmake index 4783424..a183c33 100644 --- a/Modules/Compiler/PGI-Fortran.cmake +++ b/Modules/Compiler/PGI-Fortran.cmake @@ -7,7 +7,6 @@ set(CMAKE_Fortran_PREPROCESS_SOURCE set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Mnofreeform") set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Mfreeform") -string(APPEND CMAKE_Fortran_FLAGS_INIT " -Mpreprocess -Kieee") string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -Mbounds") set(CMAKE_Fortran_MODDIR_FLAG "-module ") diff --git a/Modules/Compiler/PGI.cmake b/Modules/Compiler/PGI.cmake index 0cbfd8a..d5a57ee 100644 --- a/Modules/Compiler/PGI.cmake +++ b/Modules/Compiler/PGI.cmake @@ -19,16 +19,20 @@ macro(__compiler_pgi lang) string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -O0") string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O2 -s") string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -fast -O3") - # -Mipa was dropped with PGI 16.3 from Windows versions - if(NOT CMAKE_HOST_WIN32 OR CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 16.3) - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -Mipa=fast") - endif() string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -gopt") if(CMAKE_HOST_WIN32) string(APPEND CMAKE_${lang}_FLAGS_INIT " -Bdynamic") endif() + set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES) + if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL ppc64le AND (NOT CMAKE_HOST_WIN32 OR CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 16.3)) + set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES) + set(CMAKE_${lang}_COMPILE_OPTIONS_IPO "-Mipa=fast,inline") + else() + set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO) + endif() + # Preprocessing and assembly rules. set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") diff --git a/Modules/Platform/FreeBSD-Determine-CXX.cmake b/Modules/Platform/FreeBSD-Determine-CXX.cmake new file mode 100644 index 0000000..b594dae --- /dev/null +++ b/Modules/Platform/FreeBSD-Determine-CXX.cmake @@ -0,0 +1,3 @@ +if(NOT CMAKE_CXX_COMPILER_NAMES) + set(CMAKE_CXX_COMPILER_NAMES c++) +endif() |