From 2e20f2b604d599a6601ac824fc1ac7eb435df7ec Mon Sep 17 00:00:00 2001 From: ana Date: Tue, 2 Oct 2012 16:59:52 +0000 Subject: [PATCH] CMake: Set env var for CPPUNIT --- salome_adm/cmake_files/FindCPPUNIT.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/salome_adm/cmake_files/FindCPPUNIT.cmake b/salome_adm/cmake_files/FindCPPUNIT.cmake index aa7b8c976..91594a7f8 100644 --- a/salome_adm/cmake_files/FindCPPUNIT.cmake +++ b/salome_adm/cmake_files/FindCPPUNIT.cmake @@ -52,9 +52,13 @@ ENDIF(WITHOUT_CPPUNIT OR WITH_CPPUNIT STREQUAL 0) IF(CPPUNIT_STATUS) IF(WITH_CPPUNIT) SET(CPPUNIT_ROOT_USER ${WITH_CPPUNIT}) - ELSE(WITH_CPPUNIT) - SET(CPPUNIT_ROOT_USER $ENV{CPPUNITHOME}) ENDIF(WITH_CPPUNIT) + IF(NOT CPPUNIT_ROOT_USER) + SET(CPPUNIT_ROOT_USER $ENV{CPPUNIT_ROOT}) + ENDIF(NOT CPPUNIT_ROOT_USER) + IF(NOT CPPUNIT_ROOT_USER) + SET(CPPUNIT_ROOT_USER $ENV{CPPUNITHOME}) + ENDIF(NOT CPPUNIT_ROOT_USER) ENDIF(CPPUNIT_STATUS) # ----- @@ -92,7 +96,7 @@ IF(CPPUNIT_STATUS) IF(CPPUNIT_ROOT_USER) MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found in ${CPPUNIT_INCLUDE_PATHS}, check your CPPUNIT installation.") ELSE(CPPUNIT_ROOT_USER) - MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found on system, try to use WITH_CPPUNIT option or CPPUNITHOME environment variable.") + MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found on system, try to use WITH_CPPUNIT option or CPPUNIT_ROOT (or CPPUNITHOME) environment variable.") ENDIF(CPPUNIT_ROOT_USER) ENDIF(CPPUNIT_INCLUDE_DIR) ENDIF(CPPUNIT_STATUS) -- 2.39.2