Salome HOME
Copyright update 2022
[modules/paravis.git] / src / Plugins / MEDReader / plugin / CMakeLists.txt
index ad1f10279d8d4142b52e9c2fc71786551645c8cd..81932ad0f557a47f0c5efae9d3ef83efb7f525fd 100644 (file)
@@ -1,3 +1,22 @@
+# Copyright (C) 2010-2022  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 # Common CMake macros
 # ===================
 set(TMP_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
@@ -26,10 +45,6 @@ find_package(SalomeHDF5 REQUIRED)
 find_package(SalomeMEDCoupling REQUIRED)
 find_package(SalomeMEDFile REQUIRED)
 
-if(MEDCOUPLING_USE_64BIT_IDS)
-  add_definitions("-DMEDCOUPLING_USE_64BIT_IDS")
-endif(MEDCOUPLING_USE_64BIT_IDS)
-
 SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}
                                                  ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON})
 SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
@@ -38,7 +53,10 @@ SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/lib
 add_subdirectory(MEDLoaderForPV)
 add_subdirectory(ParaViewPlugin)
 
-option(BUILD_TESTING "Build Plugin Testing" OFF)
-if (BUILD_TESTING)
+if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
+  # option to build tests in a standalone mode
+  option(BUILD_TESTING "Build Plugin Testing" OFF)
+endif()
+if (SALOME_BUILD_TESTS OR BUILD_TESTING)
   add_subdirectory(Test)
 endif()