File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -605,6 +605,10 @@ set (PDBOPT "")
605605endif ()
606606 #if (USE_PERL)
607607message (STATUS "adding postbuild instruction to rename syms" )
608+ # VERBATIM quotes every COMMAND argument, so CMAKE_C_FLAGS has to be turned
609+ # into a list first: as a single string it is passed to the compiler as one
610+ # argument, and none of the flags or defines in it take effect.
611+ separate_arguments (DLLINIT_C_FLAGS NATIVE_COMMAND "${CMAKE_C_FLAGS } " )
608612 add_custom_command (TARGET ${OpenBLAS_LIBNAME} _static POST_BUILD
609613 COMMAND perl ${PROJECT_SOURCE_DIR } /exports/gensymbol.pl "win2k" "${ARCH} " "${BU} " "${EXPRECISION_IN} " "${NO_CBLAS_IN} " "${NO_LAPACK_IN} " "${NO_LAPACKE_IN} " "${NEED2UNDERSCORES_IN} " "${ONLY_CBLAS_IN} " "${SYMBOLPREFIX} " "${SYMBOLSUFFIX} " "${BLD} " "${BBF16} " "${BHF16} " "${BS} " "${BD} " "${BC} " "${BZ} " > ${PROJECT_BINARY_DIR } /renamesyms.def
610614 COMMAND ${CMAKE_C_COMPILER } ${CMAKE_C_FLAGS } -I${PROJECT_SOURCE_DIR} -I${PROJECT_BINARY_DIR} -c -o ${PROJECT_BINARY_DIR } /dllinit.o ${PROJECT_SOURCE_DIR } /exports/dllinit.c
Original file line number Diff line number Diff line change @@ -37,7 +37,14 @@ if (${CMAKE_C_COMPILER_ID} MATCHES "IntelLLVM")
3737endif ()
3838
3939if (${CMAKE_C_COMPILER_ID } STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID } STREQUAL "LSB" OR ${CMAKE_C_COMPILER_ID } MATCHES "Clang" )
40- set (CCOMMON_OPT "${CCOMMON_OPT} -Wall" )
40+ if (CMAKE_C_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC" )
41+ # clang-cl parses -Wall as the MSVC /Wall, which is -Weverything, so the
42+ # gcc-style -Wall meant here has to be spelled /W3 (clang-cl's alias for
43+ # it). Plain -Wall yields tens of thousands of warnings.
44+ set (CCOMMON_OPT "${CCOMMON_OPT} /W3" )
45+ else ()
46+ set (CCOMMON_OPT "${CCOMMON_OPT} -Wall" )
47+ endif ()
4148 set (COMMON_PROF "${COMMON_PROF} -fno-inline" )
4249 set (NO_UNINITIALIZED_WARN "-Wno-uninitialized" )
4350 set (GCC_VERSION ${CMAKE_C_COMPILER_VERSION } )
You can’t perform that action at this time.
0 commit comments