Salome HOME
Copyright update 2022
[modules/paravis.git] / src / Plugins / MEDReader / plugin / CMakeLists.txt
index a69b7aa6ef2048154803c4dd30f42fc5c80832a7..81932ad0f557a47f0c5efae9d3ef83efb7f525fd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2020  CEA/DEN, EDF R&D
+# 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
@@ -53,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()