Skip to content

Commit 8892865

Browse files
authored
Merge pull request #2883 from martin-frbg/issue2872
Minor CMAKE fixes
2 parents e1b7123 + 82a497e commit 8892865

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

cmake/arch.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
##
21
## Author: Hank Anderson <[email protected]>
32
## Description: Ported from portion of OpenBLAS/Makefile.system
43
## Sets various variables based on architecture.
@@ -80,10 +79,15 @@ if (DYNAMIC_ARCH)
8079
string(REGEX REPLACE "-march=native" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
8180
endif ()
8281
if (DYNAMIC_LIST)
83-
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
82+
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
8483
endif ()
8584
endif ()
8685

86+
CHECK_INCLUDE_FILE ("${PROJECT_SOURCE_DIR}/config_kernel.h" TRAP)
87+
if (TRAP)
88+
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")
89+
endif ()
90+
8791
if (NOT DYNAMIC_CORE)
8892
message (STATUS "DYNAMIC_ARCH is not supported on this architecture, removing from options")
8993
unset(DYNAMIC_ARCH CACHE)

cmake/system_check.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ endif()
121121

122122
include(CheckIncludeFile)
123123
CHECK_INCLUDE_FILE("stdatomic.h" HAVE_C11)
124-
if (HAVE_C11 EQUAL 1)
125-
message (STATUS found stdatomic.h)
124+
if (HAVE_C11)
126125
set (CCOMMON_OPT "${CCOMMON_OPT} -DHAVE_C11")
127126
endif()

0 commit comments

Comments
 (0)