Changeset 812
- Timestamp:
- 02/21/10 22:36:35 (15 years ago)
- Location:
- library
- Files:
-
- 101 added
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/CMakeLists.txt
r789 r812 20 20 ENDIF() 21 21 22 add_subdirectory(base/itpp) 23 22 24 # add BDMLIB compile flag 23 25 ADD_DEFINITIONS(-DBDMLIB) 24 25 26 # Normal BDM library 26 27 add_library (bdm STATIC ${bdm_support} ${bdm_base} ${bdm_math} ${bdm_stat} ${bdm_estim} ${bdm_ctrl} ${bdm_mex} ${bdm_user_info}) -
library/system/SetBdmEnv.cmake
r786 r812 53 53 INCLUDE(CMakeLists.local OPTIONAL) 54 54 55 FIND_PACKAGE(ITPP REQUIRED)55 #FIND_PACKAGE(ITPP REQUIRED) 56 56 FIND_PACKAGE(ACML COMPONENTS) 57 57 FIND_PACKAGE(Matlab COMPONENTS) 58 58 59 IF(ITPP_FOUND) 60 INCLUDE_DIRECTORIES(${ITPP_INCLUDE_DIR}) 61 LINK_DIRECTORIES(${NATIVE_ITPP_LIB_PATH}) 62 ENDIF(ITPP_FOUND) 59 INCLUDE_DIRECTORIES("${BDM_SOURCE_DIR}/bdm/base")#${ITPP_INCLUDE_DIR}) 60 LINK_DIRECTORIES("${BDM_SOURCE_DIR}/bdm/base/itpp")#${NATIVE_ITPP_LIB_PATH}) 63 61 64 62 IF(ACML_FOUND) … … 87 85 MACRO(EXEC FN) 88 86 add_executable (${FN} ${FN}.cpp) 87 target_link_libraries (${FN} bdm) 89 88 IF(WIN32) 90 89 target_link_libraries (${FN} debug itpp_debug) … … 98 97 target_link_libraries (${FN} debug itpp_debug) 99 98 target_link_libraries (${FN} optimized itpp) 99 target_link_libraries (${FN} lapack blas) 100 100 ELSE(ITPP_LIBRARY_DEBUG) 101 101 target_link_libraries (${FN} itpp) 102 ENDIF(ITPP_LIBRARY_DEBUG) 102 target_link_libraries (${FN} lapack blas) 103 ENDIF(ITPP_LIBRARY_DEBUG) 103 104 ENDIF(WIN32) 104 target_link_libraries (${FN} bdm)105 105 target_link_libraries (${FN} ${ARGN}) ## Additional libraries can be added to a macro 106 106 ENDMACRO(EXEC) 107 107 108 108 MACRO(LINK_EXEC FN) 109 target_link_libraries (${FN} bdm) 109 110 IF(WIN32) 110 111 target_link_libraries (${FN} debug itpp_debug) … … 118 119 target_link_libraries (${FN} debug itpp_debug) 119 120 target_link_libraries (${FN} optimized itpp) 121 target_link_libraries (${FN} lapack blas) 120 122 ELSE(ITPP_LIBRARY_DEBUG) 121 123 target_link_libraries (${FN} itpp) 124 target_link_libraries (${FN} lapack blas) 122 125 ENDIF(ITPP_LIBRARY_DEBUG) 123 126 ENDIF(WIN32) 124 target_link_libraries (${FN} bdm)125 127 ENDMACRO(LINK_EXEC) 126 128 127 129 MACRO(MEX FN) 128 130 IF(MATLAB_FOUND) 129 INCLUDE_DIRECTORIES(${MATLAB_INCLUDE_DIR} "${BDM_SOURCE_DIR}/bdm")130 LINK_DIRECTORIES("${BDM_SOURCE_DIR}/bdm")131 IF(APPLE)132 LINK_DIRECTORIES("/Applications/MATLAB_R2007b/bin/maci/")133 ENDIF(APPLE)134 IF(WIN32)135 ADD_LIBRARY("${FN}.${MATLAB_MEX_SUFFIX}" MODULE ${FN}.cpp "${BDM_SOURCE_DIR}/system/mexFunction.def")136 ELSE(WIN32)137 ADD_LIBRARY("${FN}.${MATLAB_MEX_SUFFIX}" MODULE ${FN}.cpp)138 ENDIF(WIN32)131 INCLUDE_DIRECTORIES(${MATLAB_INCLUDE_DIR} "${BDM_SOURCE_DIR}/bdm") 132 LINK_DIRECTORIES("${BDM_SOURCE_DIR}/bdm") 133 IF(APPLE) 134 LINK_DIRECTORIES("/Applications/MATLAB_R2007b/bin/maci/") 135 ENDIF(APPLE) 136 IF(WIN32) 137 ADD_LIBRARY("${FN}.${MATLAB_MEX_SUFFIX}" MODULE ${FN}.cpp "${BDM_SOURCE_DIR}/system/mexFunction.def") 138 ELSE(WIN32) 139 ADD_LIBRARY("${FN}.${MATLAB_MEX_SUFFIX}" MODULE ${FN}.cpp) 140 ENDIF(WIN32) 139 141 140 set_target_properties("${FN}.${MATLAB_MEX_SUFFIX}" PROPERTIES141 PREFIX ""142 SUFFIX ""143 COMPILE_FLAGS "-DMEX"144 )145 # general libraries146 TARGET_LINK_LIBRARIES("${FN}.${MATLAB_MEX_SUFFIX}" ${MATLAB_LIBRARIES} bdm itpp)147 # platform specific libraries148 IF(WIN32)149 target_link_libraries ("${FN}.${MATLAB_MEX_SUFFIX}" libacml_dll)150 151 152 153 154 155 ## Additional libraries can be added to a macro156 target_link_libraries ("${FN}.${MATLAB_MEX_SUFFIX}" ${ARGN})142 set_target_properties("${FN}.${MATLAB_MEX_SUFFIX}" PROPERTIES 143 PREFIX "" 144 SUFFIX "" 145 COMPILE_FLAGS "-DMEX" 146 ) 147 # general libraries 148 TARGET_LINK_LIBRARIES("${FN}.${MATLAB_MEX_SUFFIX}" ${MATLAB_LIBRARIES} bdm itpp lapack blas) 149 # platform specific libraries 150 IF(WIN32) 151 target_link_libraries ("${FN}.${MATLAB_MEX_SUFFIX}" libacml_dll) 152 ELSE(WIN32) 153 IF(APPLE) 154 target_link_libraries ("${FN}.${MATLAB_MEX_SUFFIX}" ${FRAMEWORK_VECLIB}) 155 ENDIF(APPLE) 156 ENDIF(WIN32) 157 ## Additional libraries can be added to a macro 158 target_link_libraries ("${FN}.${MATLAB_MEX_SUFFIX}" ${ARGN}) 157 159 ENDIF(MATLAB_FOUND) 158 160 ENDMACRO(MEX)