From: bruneton Date: Mon, 7 Oct 2013 07:43:14 +0000 (+0000) Subject: CMake: using SALOME_ACCUMULATE_HEADERS() to populate the complete list of includes... X-Git-Tag: BR_hydro_v_0_3_1~96 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=64042e0676910c6eda0a96ad2976ffcb15f71985;p=modules%2Fkernel.git CMake: using SALOME_ACCUMULATE_HEADERS() to populate the complete list of includes required by KERNEL header files. --- diff --git a/SalomeKERNELConfig.cmake.in b/SalomeKERNELConfig.cmake.in index 60fa8cc39..7de8498ff 100644 --- a/SalomeKERNELConfig.cmake.in +++ b/SalomeKERNELConfig.cmake.in @@ -48,7 +48,7 @@ SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@") # Include directories and definitions SET_AND_CHECK(KERNEL_INCLUDE_DIRS "${KERNEL_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@") -#SET(KERNEL_INCLUDE_DIRS "${KERNEL_INCLUDE_DIRS};@_SalomeKERNEL_EXTRA_HEADERS@") +SET(KERNEL_INCLUDE_DIRS "${KERNEL_INCLUDE_DIRS};@_SalomeKERNEL_EXTRA_HEADERS@") SET(KERNEL_DEFINITIONS) #### Now the specificities @@ -85,12 +85,6 @@ IF(SALOME_USE_LIBBATCH) SET_AND_CHECK(LIBBATCH_ROOT_DIR_EXP "@PACKAGE_LIBBATCH_ROOT_DIR@") ENDIF() -# We need to export Boost_INCLUDE_DIRS because dependent projects may use header file -# SALOMEDSClient_definitions.hxx that depends on Boost shared pointers -SET_AND_CHECK(BOOST_ROOT_DIR_EXP "@PACKAGE_BOOST_ROOT_DIR@") -SET(KERNEL_INCLUDE_DIRS "${KERNEL_INCLUDE_DIRS};@Boost_INCLUDE_DIRS@") -SET(KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS};@BOOST_DEFINITIONS@") - SET_AND_CHECK(PTHREAD_ROOT_DIR_EXP "@PACKAGE_PTHREAD_ROOT_DIR@") SET_AND_CHECK(HDF5_ROOT_DIR_EXP "@PACKAGE_HDF5_ROOT_DIR@") SET_AND_CHECK(LIBXML2_ROOT_DIR_EXP "@PACKAGE_LIBXML2_ROOT_DIR@") diff --git a/salome_adm/cmake_files/FindSalomeBoost.cmake b/salome_adm/cmake_files/FindSalomeBoost.cmake index 93ba717ec..f93a88afa 100644 --- a/salome_adm/cmake_files/FindSalomeBoost.cmake +++ b/salome_adm/cmake_files/FindSalomeBoost.cmake @@ -45,4 +45,4 @@ IF(WIN32) SET(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS) ENDIF() -#SALOME_ACCUMULATE_HEADERS(Boost_INCLUDE_DIRS) +SALOME_ACCUMULATE_HEADERS(Boost_INCLUDE_DIRS) diff --git a/salome_adm/cmake_files/FindSalomeCAS.cmake b/salome_adm/cmake_files/FindSalomeCAS.cmake index 99e00f8ba..91bf92549 100644 --- a/salome_adm/cmake_files/FindSalomeCAS.cmake +++ b/salome_adm/cmake_files/FindSalomeCAS.cmake @@ -45,3 +45,7 @@ ELSE() SET(CAS_STDPLUGIN TKStdSchema) ENDIF() ENDIF() + +SALOME_ACCUMULATE_HEADERS(CAS_INCLUDE_DIRS) + + diff --git a/salome_adm/cmake_files/FindSalomeCppUnit.cmake b/salome_adm/cmake_files/FindSalomeCppUnit.cmake index 4eaf46eed..e8a5527e9 100644 --- a/salome_adm/cmake_files/FindSalomeCppUnit.cmake +++ b/salome_adm/cmake_files/FindSalomeCppUnit.cmake @@ -27,4 +27,4 @@ SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(CppUnit CPPUNIT_INCLUDE_DIRS 1) MARK_AS_ADVANCED(CPPUNIT_INCLUDE_DIRS CPPUNIT_LIBRARIES CPPUNIT_CONFIG_BIN CPPUNIT_SUBLIB_cppunit CPPUNIT_SUBLIB_dl) -#SALOME_ACCUMULATE_HEADERS(CPPUNIT_INCLUDE_DIRS) +SALOME_ACCUMULATE_HEADERS(CPPUNIT_INCLUDE_DIRS) diff --git a/salome_adm/cmake_files/FindSalomeHDF5.cmake b/salome_adm/cmake_files/FindSalomeHDF5.cmake index 24be3f1f5..c6460a944 100644 --- a/salome_adm/cmake_files/FindSalomeHDF5.cmake +++ b/salome_adm/cmake_files/FindSalomeHDF5.cmake @@ -42,7 +42,7 @@ IF(NOT DEFINED HDF5_LIBRARIES) SET(HDF5_LIBRARIES hdf5) ENDIF() -#SALOME_ACCUMULATE_HEADERS(HDF5_INCLUDE_DIRS) +SALOME_ACCUMULATE_HEADERS(HDF5_INCLUDE_DIRS) ## ## 7. Specific to HDF5 only: diff --git a/salome_adm/cmake_files/FindSalomeLibBatch.cmake b/salome_adm/cmake_files/FindSalomeLibBatch.cmake index 6922b184f..d7ce2e54e 100644 --- a/salome_adm/cmake_files/FindSalomeLibBatch.cmake +++ b/salome_adm/cmake_files/FindSalomeLibBatch.cmake @@ -27,5 +27,5 @@ SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(LibBatch LIBBATCH_ROOT_DIR_EXP 0) #MARK_AS_ADVANCED() -#SALOME_ACCUMULATE_HEADERS(LIBBATCH_INCLUDE_DIRS) +SALOME_ACCUMULATE_HEADERS(LIBBATCH_INCLUDE_DIRS) diff --git a/salome_adm/cmake_files/FindSalomeLibXml2.cmake b/salome_adm/cmake_files/FindSalomeLibXml2.cmake index 78019255e..c736b2e63 100644 --- a/salome_adm/cmake_files/FindSalomeLibXml2.cmake +++ b/salome_adm/cmake_files/FindSalomeLibXml2.cmake @@ -28,4 +28,4 @@ ELSE() ENDIF() #MARK_AS_ADVANCED() -#SALOME_ACCUMULATE_HEADERS(LIBXML2_INCLUDE_DIR) +SALOME_ACCUMULATE_HEADERS(LIBXML2_INCLUDE_DIR) diff --git a/salome_adm/cmake_files/FindSalomeMEDFile.cmake b/salome_adm/cmake_files/FindSalomeMEDFile.cmake index a44420836..b53e057b5 100644 --- a/salome_adm/cmake_files/FindSalomeMEDFile.cmake +++ b/salome_adm/cmake_files/FindSalomeMEDFile.cmake @@ -26,3 +26,5 @@ SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MEDFile MEDFILE_INCLUDE_DIRS 1) #MARK_AS_ADVANCED() + +SALOME_ACCUMULATE_HEADERS(MEDFILE_INCLUDE_DIRS) \ No newline at end of file diff --git a/salome_adm/cmake_files/FindSalomeMPI.cmake b/salome_adm/cmake_files/FindSalomeMPI.cmake index 2d0df7a84..a12c163f9 100644 --- a/salome_adm/cmake_files/FindSalomeMPI.cmake +++ b/salome_adm/cmake_files/FindSalomeMPI.cmake @@ -29,3 +29,5 @@ MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY) SET(MPI_INCLUDE_DIRS ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH}) SET(MPI_LIBRARIES ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES}) + +SALOME_ACCUMULATE_HEADERS(MPI_INCLUDE_DIRS) diff --git a/salome_adm/cmake_files/FindSalomeOmniORB.cmake b/salome_adm/cmake_files/FindSalomeOmniORB.cmake index 548475a59..b7ec2d984 100644 --- a/salome_adm/cmake_files/FindSalomeOmniORB.cmake +++ b/salome_adm/cmake_files/FindSalomeOmniORB.cmake @@ -26,4 +26,4 @@ SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORB OMNIORB_INCLUDE_DIR 1) #MARK_AS_ADVANCED() -#SALOME_ACCUMULATE_HEADERS(OMNIORB_INCLUDE_DIR) \ No newline at end of file +SALOME_ACCUMULATE_HEADERS(OMNIORB_INCLUDE_DIR) \ No newline at end of file diff --git a/salome_adm/cmake_files/FindSalomePThread.cmake b/salome_adm/cmake_files/FindSalomePThread.cmake index 4d1353fb5..70639b708 100644 --- a/salome_adm/cmake_files/FindSalomePThread.cmake +++ b/salome_adm/cmake_files/FindSalomePThread.cmake @@ -25,3 +25,5 @@ # SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PThread PTHREAD_INCLUDE_DIR 1) MARK_AS_ADVANCED(PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIR) + +SALOME_ACCUMULATE_HEADERS(PTHREAD_INCLUDE_DIR) diff --git a/salome_adm/cmake_files/FindSalomePython.cmake b/salome_adm/cmake_files/FindSalomePython.cmake index 5c1f6e87c..89c4eb6fd 100644 --- a/salome_adm/cmake_files/FindSalomePython.cmake +++ b/salome_adm/cmake_files/FindSalomePython.cmake @@ -150,6 +150,7 @@ IF (SALOMEPYTHON_FOUND) ## 6. Save the final detected installation ## SET(PYTHON_ROOT_DIR "${_tmp_ROOT_DIR}") + SALOME_ACCUMULATE_HEADERS(PYTHON_INCLUDE_DIR) ## 7. Specifics ## diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index a156c08b0..3c3bf2d46 100755 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -628,7 +628,9 @@ MACRO(SALOME_ACCUMULATE_HEADERS lst) FOREACH(l IN LISTS ${lst}) LIST(FIND _${PROJECT_NAME}_EXTRA_HEADERS "${l}" _res) IF(_res EQUAL "-1") - LIST(APPEND _${PROJECT_NAME}_EXTRA_HEADERS "${l}") + IF(NOT "${l}" STREQUAL "/usr/include") + LIST(APPEND _${PROJECT_NAME}_EXTRA_HEADERS "${l}") + ENDIF() ENDIF() ENDFOREACH() ENDMACRO(SALOME_ACCUMULATE_HEADERS)