Skip to content

Commit

Permalink
Intel compiler used to automatically include -lstdc++ but no longer. …
Browse files Browse the repository at this point in the history
…Have to add it explicitly.
  • Loading branch information
khuck committed Sep 25, 2024
1 parent 0449b43 commit bcede4e
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,7 @@ if (APEX_USE_PEDANTIC)
endif(APEX_WITH_CUDA)
endif (APEX_USE_PEDANTIC)

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM")
set(APEX_STDCXX_LIB "" CACHE STRING "C++ library for linking")
message("IntelLLVM compiler detected, no stdc++ library needed")
else()
set(APEX_STDCXX_LIB stdc++ CACHE STRING "C++ library for linking")
endif()
set(APEX_STDCXX_LIB stdc++ CACHE STRING "C++ library for linking")

# PGI and Intel don't like the concurrentqueue code.
if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
Expand All @@ -365,35 +360,6 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# add_definitions(-std=c++11)
#include(CheckCXXCompilerFlag)
#CHECK_CXX_COMPILER_FLAG("-std=c++17" COMPILER_SUPPORTS_CXX17)
#if(COMPILER_SUPPORTS_CXX17)
# set(CMAKE_CXX_SUPPORT_FLAG "-std=c++17" CACHE STRING "CXX Support Flag" FORCE)
#else()
# CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
# if(COMPILER_SUPPORTS_CXX14)
# set(CMAKE_CXX_SUPPORT_FLAG "-std=c++14" CACHE STRING "CXX Support Flag" FORCE)
# else()
# CHECK_CXX_COMPILER_FLAG("-std=c++1y" COMPILER_SUPPORTS_CXX1Y)
# if(COMPILER_SUPPORTS_CXX1Y)
# set(CMAKE_CXX_SUPPORT_FLAG "-std=c++1y" CACHE STRING "CXX Support Flag" FORCE)
# else()
# CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
# if(COMPILER_SUPPORTS_CXX11)
# set(CMAKE_CXX_SUPPORT_FLAG "-std=c++11" CACHE STRING "CXX Support Flag" FORCE)
# else()
# CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
# if(COMPILER_SUPPORTS_CXX0X)
# set(CMAKE_CXX_SUPPORT_FLAG "-std=c++0x" CACHE STRING "CXX Support Flag" FORCE)
# else()
# message(FATAL_ERROR " Compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
# endif()
# endif()
# endif()
# endif()
#endif()

# By the way, GCC lies. It accepts the flag, but doesn't have the support.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
Expand Down

0 comments on commit bcede4e

Please sign in to comment.