diff --git a/cmake/HermitCore-Toolchain-x86-bootstrap.cmake b/cmake/HermitCore-Toolchain-x86-bootstrap.cmake new file mode 100644 index 000000000..aa83a3900 --- /dev/null +++ b/cmake/HermitCore-Toolchain-x86-bootstrap.cmake @@ -0,0 +1,11 @@ +include(${CMAKE_CURRENT_LIST_DIR}/HermitCore-Toolchain-x86.cmake) +include_guard() + +set(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "") +set(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "") + +# unset unneeded compilers +unset(CMAKE_Go_COMPILER) +unset(CMAKE_Fortran_COMPILER) + +set(BOOTSTRAP true) diff --git a/cmake/HermitCore.cmake b/cmake/HermitCore.cmake index babff2689..e5134f44b 100644 --- a/cmake/HermitCore.cmake +++ b/cmake/HermitCore.cmake @@ -77,8 +77,10 @@ set(HERMIT_KERNEL_INCLUDES # # Furthermore this will produce a sensible error message if the toolchain cannot # be found. -enable_language(C CXX Fortran Go) -include(${CMAKE_CURRENT_LIST_DIR}/HermitCore-Paths.cmake) +if(NOT BOOTSTRAP) + enable_language(C CXX Fortran Go) + include(${CMAKE_CURRENT_LIST_DIR}/HermitCore-Paths.cmake) +endif() # find elfedit, CMake doesn't use this program, so we have to find it ourself find_toolchain_program(elfedit)