From 19aa105166937beb7a6424d9779790979a2aa758 Mon Sep 17 00:00:00 2001 From: jensenrichardson <61769418+jensenrichardson@users.noreply.github.com> Date: Thu, 5 Nov 2020 11:48:35 -0600 Subject: [PATCH 1/3] Adds intel compiler option for cmake buildutils --- cpp/cmake_modules/BuildUtils.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake index e59b4a38af0..2fd897b5d1d 100644 --- a/cpp/cmake_modules/BuildUtils.cmake +++ b/cpp/cmake_modules/BuildUtils.cmake @@ -177,7 +177,7 @@ function(create_merged_static_lib output_target) "-o" ${output_lib_path} ${all_library_paths}) - elseif(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|GNU)$") + elseif(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|GNU|Intel)$") set(ar_script_path ${CMAKE_BINARY_DIR}/${ARG_NAME}.ar) file(WRITE ${ar_script_path}.in "CREATE ${output_lib_path}\n") From 0df86194722554576fbc9f2a8056ad188bb3d52c Mon Sep 17 00:00:00 2001 From: jensenrichardson <61769418+jensenrichardson@users.noreply.github.com> Date: Thu, 5 Nov 2020 11:50:38 -0600 Subject: [PATCH 2/3] Adds intel case for compiler warnings --- cpp/cmake_modules/SetupCxxFlags.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake index f812c96c2ad..97a85a4d204 100644 --- a/cpp/cmake_modules/SetupCxxFlags.cmake +++ b/cpp/cmake_modules/SetupCxxFlags.cmake @@ -283,7 +283,8 @@ else() set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /W3") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" - OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall") else() message(FATAL_ERROR "${UNKNOWN_COMPILER_MESSAGE}") From ef18e6ce5a3e0d2dfdb7f38e4b690e313f45e87c Mon Sep 17 00:00:00 2001 From: jensenrichardson <61769418+jensenrichardson@users.noreply.github.com> Date: Thu, 5 Nov 2020 11:55:11 -0600 Subject: [PATCH 3/3] Fixes unknown compiler message It used to print the compiler version twice instead of the compiler id and then the compiler version. --- cpp/cmake_modules/SetupCxxFlags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake index f812c96c2ad..b0ab03d487d 100644 --- a/cpp/cmake_modules/SetupCxxFlags.cmake +++ b/cpp/cmake_modules/SetupCxxFlags.cmake @@ -126,7 +126,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE) set(UNKNOWN_COMPILER_MESSAGE - "Unknown compiler: ${CMAKE_CXX_COMPILER_VERSION} ${CMAKE_CXX_COMPILER_VERSION}") + "Unknown compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}") # compiler flags that are common across debug/release builds if(WIN32)