From 2182deaf470a90a26dcd9f4926d33096aef0962a Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Tue, 18 Feb 2020 12:33:11 +0100 Subject: [PATCH] [CMake] Check for 64 bit before Conan setup. --- CMakeLists.txt | 1 + scripts/cmake/CheckArchitecture.cmake | 6 ++++++ scripts/cmake/ProjectSetup.cmake | 7 ------- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 scripts/cmake/CheckArchitecture.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 4139f13aeb9..db02ae460a4 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 00000000000..592b44d7353 --- /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 ba540492608..0f0f6f5eb46 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) -- GitLab