From bd150ff2441a3bd6f8c0d47d956c0f69b51cbb0b Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 2 Apr 2020 18:44:06 +0300 Subject: [PATCH] Fix for #18930 [CEA][Windows] Compile ADAO on Windows: add the check that SalomeSetupPlatform is included before FindSalomeMESHGEMS, FindSalomeOmniORB, FindSalomeTBB --- cmake/FindSalomeMESHGEMS.cmake | 4 ++++ cmake/FindSalomeOmniORB.cmake | 6 ++++++ cmake/FindSalomeTBB.cmake | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/cmake/FindSalomeMESHGEMS.cmake b/cmake/FindSalomeMESHGEMS.cmake index 9acf059..9688a6d 100644 --- a/cmake/FindSalomeMESHGEMS.cmake +++ b/cmake/FindSalomeMESHGEMS.cmake @@ -17,6 +17,10 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +IF(NOT DEFINED MACHINE_IS_64) + MESSAGE(FATAL_ERROR "Developer error -> SalomeSetupPlatform macros should be inclided before find_package(SalomeMESHGEMS) !") +ENDIF() + SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MESHGEMS MESHGEMS_INCLUDE_DIRS 1) MARK_AS_ADVANCED(MESHGEMS_INCLUDE_DIRS MESHGEMS_CADSURF_LIBRARY MESHGEMS_HEXA_LIBRARY MESHGEMS_HYBRID_LIBRARY MESHGEMS_TETRA_LIBRARY MESHGEMS_TETRA_HPC_LIBRARY) diff --git a/cmake/FindSalomeOmniORB.cmake b/cmake/FindSalomeOmniORB.cmake index dfb2e62..320cbb1 100644 --- a/cmake/FindSalomeOmniORB.cmake +++ b/cmake/FindSalomeOmniORB.cmake @@ -23,6 +23,12 @@ # # !! Please read the generic detection procedure in SalomeMacros.cmake !! # +IF(WIN32) + IF(NOT DEFINED SIZEOF_LONG) + MESSAGE(FATAL_ERROR "Developer error -> SalomeSetupPlatform macros should be inclided before find_package(SalomeOmniORB) !") + ENDIF() +ENDIF() + SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORB OMNIORB_INCLUDE_DIR 1) #MARK_AS_ADVANCED() diff --git a/cmake/FindSalomeTBB.cmake b/cmake/FindSalomeTBB.cmake index 48b55b1..8331f2f 100644 --- a/cmake/FindSalomeTBB.cmake +++ b/cmake/FindSalomeTBB.cmake @@ -17,6 +17,10 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +IF(NOT DEFINED MACHINE_IS_64) + MESSAGE(FATAL_ERROR "Developer error -> SalomeSetupPlatform macros should be inclided before find_package(SalomeTBB) !") +ENDIF() + SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(TBB TBB_INCLUDE_DIRS 1) IF(TBB_INCLUDE_DIRS AND TBB_LIBRARIES) -- 2.39.2