diff --git a/.conan/profiles/compiler/intel b/.conan/profiles/compiler/intel new file mode 100644 index 00000000..980581be --- /dev/null +++ b/.conan/profiles/compiler/intel @@ -0,0 +1,19 @@ +[settings] +compiler=intel-cc +compiler.mode=icx + +{% set os = detect_api.detect_os() %} +{% if os == "Linux" %} +[conf] +tools.intel:installation_path=/opt/intel/oneapi/ +[buildenv] +CC=icx +CXX=icpx +{% endif %} +{% if os == "Windows" %} +[conf] +tools.intel:installation_path=C:\Program Files (x86)\Intel\oneAPI +[buildenv] +CC=icx +CXX=icx +{% endif %} \ No newline at end of file diff --git a/.conan/profiles/intel/2023.2/compiler b/.conan/profiles/intel/2023.2/compiler new file mode 100644 index 00000000..4b925818 --- /dev/null +++ b/.conan/profiles/intel/2023.2/compiler @@ -0,0 +1,4 @@ +include(../../compiler/intel) + +[settings] +compiler.version=2023.2 diff --git a/.conan/profiles/intel/2023.2/x64-libstdc++-debug b/.conan/profiles/intel/2023.2/x64-libstdc++-debug new file mode 100644 index 00000000..ea92b135 --- /dev/null +++ b/.conan/profiles/intel/2023.2/x64-libstdc++-debug @@ -0,0 +1,7 @@ +include(../../default) +include(../../arch/x64) +include(../../cpp/23) +include(../../config/debug) +include(../../os/current) +include(../../packages/settings) +include(compiler) diff --git a/.conan/profiles/intel/2023.2/x64-libstdc++-msr b/.conan/profiles/intel/2023.2/x64-libstdc++-msr new file mode 100644 index 00000000..b22ba5f6 --- /dev/null +++ b/.conan/profiles/intel/2023.2/x64-libstdc++-msr @@ -0,0 +1,7 @@ +include(../../default) +include(../../arch/x64) +include(../../cpp/23) +include(../../config/min-size-rel) +include(../../os/current) +include(../../packages/settings) +include(compiler) diff --git a/.conan/profiles/intel/2023.2/x64-libstdc++-release b/.conan/profiles/intel/2023.2/x64-libstdc++-release new file mode 100644 index 00000000..1ef22129 --- /dev/null +++ b/.conan/profiles/intel/2023.2/x64-libstdc++-release @@ -0,0 +1,7 @@ +include(../../default) +include(../../arch/x64) +include(../../cpp/23) +include(../../config/release) +include(../../os/current) +include(../../packages/settings) +include(compiler) diff --git a/.conan/profiles/intel/2023.2/x64-libstdc++-rwdi b/.conan/profiles/intel/2023.2/x64-libstdc++-rwdi new file mode 100644 index 00000000..4c9c3641 --- /dev/null +++ b/.conan/profiles/intel/2023.2/x64-libstdc++-rwdi @@ -0,0 +1,7 @@ +include(../../default) +include(../../arch/x64) +include(../../cpp/23) +include(../../config/rel-with-deb-info) +include(../../os/current) +include(../../packages/settings) +include(compiler) diff --git a/.conan/profiles/packages/settings b/.conan/profiles/packages/settings index af10ac42..1f512378 100644 --- a/.conan/profiles/packages/settings +++ b/.conan/profiles/packages/settings @@ -1,5 +1,5 @@ {% set os = detect_api.detect_os() %} -{% if os == "Linux" -%} +{% if os == "Linux" %} [settings] mold*:build_type=Release onetbb*:build_type=Release diff --git a/CMakeLists.txt b/CMakeLists.txt index c7c94275..87d3c03f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ include(GNUInstallDirs) include(CMakeDependentOption) include(CMakePackageConfigHelpers) +option(MORPHEUS_BUILD_WITH_INTEL "Enable Intel oneAPI DPC++/C++ Compiler" ON) option(MORPHEUS_LINK_WITH_MOLD "Enable the mold linker" ON) cmake_dependent_option(MORPHEUS_CODE_COVERAGE "Enable code coverage" ON "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"Clang\" OR \"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"GNU\"" OFF) cmake_dependent_option(MORPHEUS_INCLUDE_NATVIS "Enable inclusion of a natvis files for debugging" ON "\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"MSVC\"" OFF) diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index 93323d71..60ceb34b 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -33,4 +33,12 @@ target_compile_options(MorpheusConfig $<$:${MSVC_WARNINGS}> $<$:${GCC_WARNINGS}> $<$,$>:${CLANG_WARNINGS}> + <$:${CLANG_WARNINGS}> ) + +if (${MORPHEUS_BUILD_WITH_INTEL}) + find_package(IntelSYSCL REQUIRED) + message(STATUS "Morpheus: found Intel One API DPC++/C++ Compiler.") + set(CMAKE_C_COMPILER icx PARENT_SCOPE) + set(CMAKE_CXX_COMPILER icpx PARENT_SCOPE) +endif() diff --git a/cmake/linker.cmake b/cmake/linker.cmake index 6d9871aa..520c73de 100644 --- a/cmake/linker.cmake +++ b/cmake/linker.cmake @@ -17,7 +17,7 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR include_guard(GLOBAL) -if (${MORPHEUS_LINK_WITH_MOLD}) +if (${MORPHEUS_LINK_WITH_MOLD} AND NOT ${MORPHEUS_BUILD_WITH_INTEL}) find_program(MOLD_BIN mold REQUIRED) if(MOLD_BIN) message(STATUS "Morpheus: Mold linker found: ${MOLD_BIN}. Enabling mold as active linker.") diff --git a/conanfile.py b/conanfile.py index 572978be..28cdcabd 100644 --- a/conanfile.py +++ b/conanfile.py @@ -135,7 +135,7 @@ def _minimum_cpp_standard(self): @property def _minimum_compilers_version(self): return { -# "intel-cc": "??" + "intel-cc": "2023.2", "msvc": "16", "gcc": "11", "clang": "13",