diff --git a/CMakeLists.txt b/CMakeLists.txt index 4139f13aeb92c66ac9fef400141b187e0312ad17..db02ae460a492183d076b74c2f72b1ff1210f484 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,6 +65,7 @@ include(PreFind) include(SubmoduleSetup) include(Versions) include(CheckTypeSizes) +include(CheckArchitecture) include(Functions) include(ConanSetup) include(CompilerSetup) diff --git a/scripts/cmake/CheckArchitecture.cmake b/scripts/cmake/CheckArchitecture.cmake new file mode 100644 index 0000000000000000000000000000000000000000..592b44d7353be4ce9c933c5a7df9fc564cf93a5d --- /dev/null +++ b/scripts/cmake/CheckArchitecture.cmake @@ -0,0 +1,6 @@ +# Check architecture +if(MSVC AND NOT HAVE_64_BIT AND NOT OGS_32_BIT) + message(FATAL_ERROR "Building OGS on Windows with 32-bit is not supported! \ +Either use the correct generator, e.g. 'Visual Studio 14 2015 Win64' or define \ +'-DOGS_32_BIT=ON' if you know what you are doing.") +endif() diff --git a/scripts/cmake/ProjectSetup.cmake b/scripts/cmake/ProjectSetup.cmake index ba5404926083481a7c36dad8e88cf1267242445a..0f0f6f5eb46f2b6d76ed3499808ff043e7f3820e 100644 --- a/scripts/cmake/ProjectSetup.cmake +++ b/scripts/cmake/ProjectSetup.cmake @@ -1,10 +1,3 @@ -# Check requirements / supported configurations -if(MSVC AND NOT HAVE_64_BIT AND NOT OGS_32_BIT) - message(FATAL_ERROR "Building OGS on Windows with 32-bit is not supported! \ -Either use the correct generator, e.g. 'Visual Studio 14 2015 Win64' or define \ -'-DOGS_32_BIT=ON' if you know what you are doing.") -endif() - # Set build directories set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)