File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -15,25 +15,28 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
1515 if (GCCROOT)
1616 set (__GA_GCC_INSTALL_PREFIX ${GCCROOT} )
1717 set (GA_GCC_TOOLCHAIN_FLAG "--gcc-toolchain=${GCCROOT} " )
18- else ()
19- get_filename_component (__GA_GCC_INSTALL_PREFIX "${CMAKE_Fortran_COMPILER} /../.." ABSOLUTE )
20- if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" )
21- set (GA_GCC_TOOLCHAIN_FLAG "--gcc-toolchain=${__GA_GCC_INSTALL_PREFIX} " )
22- else ()
23- message (FATAL_ERROR "GCCROOT cmake option not set when using clang compilers. \
24- Please set a valid path to the GCC installation." )
25- endif ()
18+ # else()
19+ # get_filename_component(__GA_GCC_INSTALL_PREFIX "${CMAKE_Fortran_COMPILER}/../.." ABSOLUTE)
20+ # if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
21+ # set(GA_GCC_TOOLCHAIN_FLAG "--gcc-toolchain=${__GA_GCC_INSTALL_PREFIX}")
22+ # else()
23+ # message(FATAL_ERROR "GCCROOT cmake option not set when using clang compilers. \
24+ # Please set a valid path to the GCC installation.")
25+ # endif()
2626 endif ()
2727 #Check GCC installation
28- if (NOT
28+ if (GCCROOT)
29+ if (NOT
2930 (EXISTS ${__GA_GCC_INSTALL_PREFIX} /bin AND
3031 EXISTS ${__GA_GCC_INSTALL_PREFIX} /include AND
3132 EXISTS ${__GA_GCC_INSTALL_PREFIX} /lib)
3233 )
3334 message (FATAL_ERROR "GCC installation path found ${__GA_GCC_INSTALL_PREFIX} seems to be incorrect. \
3435 Please set the GCCROOT cmake option to the correct GCC installation prefix." )
35- endif ()
36+ endif ()
3637 message (STATUS "GA_GCC_TOOLCHAIN_FLAG: ${GA_GCC_TOOLCHAIN_FLAG} " )
38+ endif ()
39+
3740 set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${GA_GCC_TOOLCHAIN_FLAG} " )
3841 set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${GA_GCC_TOOLCHAIN_FLAG} " )
3942 set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${GA_GCC_TOOLCHAIN_FLAG} " )
You can’t perform that action at this time.
0 commit comments