Stop DYNAMIC_ARCH build if the toplevel source contains a stray config_kernel.h from a gmake build
This is unlikely to happen in practice, but if it does, the rogue file would get included instead of the dynamically generated version for each target_core, leading to very confusing errors like "invalid operands (undefined UND and ABS sections)" in compilation of the assembly kernels as macros like PREFETCH would remain undefined
This commit is contained in:
parent
2367726578
commit
de27e4f5fb
|
@ -1,4 +1,3 @@
|
||||||
##
|
|
||||||
## Author: Hank Anderson <hank@statease.com>
|
## Author: Hank Anderson <hank@statease.com>
|
||||||
## Description: Ported from portion of OpenBLAS/Makefile.system
|
## Description: Ported from portion of OpenBLAS/Makefile.system
|
||||||
## Sets various variables based on architecture.
|
## Sets various variables based on architecture.
|
||||||
|
@ -80,10 +79,15 @@ if (DYNAMIC_ARCH)
|
||||||
string(REGEX REPLACE "-march=native" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
string(REGEX REPLACE "-march=native" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||||
endif ()
|
endif ()
|
||||||
if (DYNAMIC_LIST)
|
if (DYNAMIC_LIST)
|
||||||
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
|
set(DYNAMIC_CORE ${DYNAMIC_LIST})
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
CHECK_INCLUDE_FILE ("${PROJECT_SOURCE_DIR}/config_kernel.h" TRAP)
|
||||||
|
if (TRAP)
|
||||||
|
message (FATAL_ERROR "Your build directory contains a file config_kernel.h, probably from a previous compilation with make. This will conflict with the cmake compilation and cause strange compiler errors - please remove the file before trying again")
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (NOT DYNAMIC_CORE)
|
if (NOT DYNAMIC_CORE)
|
||||||
message (STATUS "DYNAMIC_ARCH is not supported on this architecture, removing from options")
|
message (STATUS "DYNAMIC_ARCH is not supported on this architecture, removing from options")
|
||||||
unset(DYNAMIC_ARCH CACHE)
|
unset(DYNAMIC_ARCH CACHE)
|
||||||
|
|
Loading…
Reference in New Issue