Skip to content

Commit 8e3dfd2

Browse files
committed
correct location of cmake insource check
1 parent d6b1c16 commit 8e3dfd2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
cmake_minimum_required(VERSION 3.15)
22

3-
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
4-
message(FATAL_ERROR "use cmake -B build or similar to avoid building in-source")
5-
endif()
6-
73
if(NOT CMAKE_BUILD_TYPE)
84
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Debug or Release")
95
endif()
@@ -14,6 +10,10 @@ project(h5fortran
1410
DESCRIPTION "thin, light object-oriented HDF5 Fortran interface"
1511
HOMEPAGE_URL https://github.com/geospace-code/h5fortran)
1612

13+
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
14+
message(FATAL_ERROR "use 'cmake -B build' or similar to avoid building in-source")
15+
endif()
16+
1717
include(CTest)
1818

1919
if(NOT DEFINED ${PROJECT_NAME}_BUILD_TESTING)

0 commit comments

Comments
 (0)