Changeset 827
- Timestamp:
- 02/23/10 11:33:09 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/system/SetBdmEnv.cmake
r812 r827 16 16 # THEN IT IS NECESSARY TO CREATE TEXT FILE "\system\WIN32\LOCAL_PATHS.TXT" WITH 17 17 # COPIES OF THE TWO FOLLOWING LINES AND THEN CORECT ALL THE INVOLVED PATHS 18 IF(NOT ITPP_DIR)19 SET(ITPP_DIR "${BDM_SOURCE_DIR}\\system\\win32\\itpp-4.0.6")20 ENDIF(NOT ITPP_DIR)21 18 IF(NOT ACML_DIR) 22 19 SET(ACML_DIR "${BDM_SOURCE_DIR}\\system\\win32\\acml3.6.0") … … 26 23 ADD_DEFINITIONS(-DHAVE_ACML) 27 24 ADD_DEFINITIONS(/wd4290) 28 ADD_DEFINITIONS(-D_CRT_SECURE_NO_ WARNINGS)25 ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) 29 26 ADD_DEFINITIONS(-DLIBCONFIG_STATIC -DLIBCONFIGXX_STATIC) 27 28 FIND_PACKAGE(ACML REQUIRED) 29 IF(ACML_FOUND) 30 INCLUDE_DIRECTORIES(${ACML_INCLUDE_DIR}) 31 LINK_DIRECTORIES(${NATIVE_ACML_LIB_PATH}) 32 ENDIF(ACML_FOUND) 33 SET(lapack_libs libacml_dll) 30 34 ENDIF(WIN32) 31 35 IF(APPLE) 32 IF(NOT ITPP_DIR)33 SET(ITPP_DIR "${BDM_SOURCE_DIR}/system/macosx/itpp-4.0.6")34 ENDIF(NOT ITPP_DIR)35 36 FIND_LIBRARY(FRAMEWORK_VECLIB vecLib) 36 37 ADD_DEFINITIONS(-DHAVE_XLOCALE_H) 38 SET(lapack_libs ${FRAMEWORK_VECLIB}) 37 39 ENDIF(APPLE) 38 40 IF(UNIX) 39 # Generally this directory should not exist! 40 # Use this location is you compile itpp from sources 41 MESSAGE("ITPPDIR $ENV{ITPP_DIR}") 42 IF($ENV{ITPP_DIR}) 43 SET(ITPP_DIR $ENV{ITPP_DIR}) 44 ELSE($ENV{ITPP_DIR}) 45 SET(ITPP_DIR "${BDM_SOURCE_DIR}/system/linux/") 46 ENDIF($ENV{ITPP_DIR}) 47 MESSAGE("ITPPDIR ${ITPP_DIR}") 48 #This is for UNIX makefile which does only one release at a time. 41 SET(lapack_libs lapack blas) 49 42 ENDIF(UNIX) 50 43 … … 53 46 INCLUDE(CMakeLists.local OPTIONAL) 54 47 55 #FIND_PACKAGE(ITPP REQUIRED)56 FIND_PACKAGE(ACML COMPONENTS)57 48 FIND_PACKAGE(Matlab COMPONENTS) 58 49 50 51 ## BUILD own ITPP 59 52 INCLUDE_DIRECTORIES("${BDM_SOURCE_DIR}/bdm/base")#${ITPP_INCLUDE_DIR}) 60 53 LINK_DIRECTORIES("${BDM_SOURCE_DIR}/bdm/base/itpp")#${NATIVE_ITPP_LIB_PATH}) 61 54 62 IF(ACML_FOUND)63 INCLUDE_DIRECTORIES(${ACML_INCLUDE_DIR})64 LINK_DIRECTORIES(${NATIVE_ACML_LIB_PATH})65 ENDIF(ACML_FOUND)66 55 67 56 IF(UNIX) … … 86 75 add_executable (${FN} ${FN}.cpp) 87 76 target_link_libraries (${FN} bdm) 88 IF(WIN32) 89 target_link_libraries (${FN} debug itpp_debug) 90 target_link_libraries (${FN} optimized itpp) 91 target_link_libraries (${FN} libacml_dll) 92 ELSE(WIN32) 93 IF(APPLE) 94 target_link_libraries (${FN} ${FRAMEWORK_VECLIB}) 95 ENDIF(APPLE) 96 IF(ITPP_LIBRARY_DEBUG) 97 target_link_libraries (${FN} debug itpp_debug) 98 target_link_libraries (${FN} optimized itpp) 99 target_link_libraries (${FN} lapack blas) 100 ELSE(ITPP_LIBRARY_DEBUG) 101 target_link_libraries (${FN} itpp) 102 target_link_libraries (${FN} lapack blas) 103 ENDIF(ITPP_LIBRARY_DEBUG) 104 ENDIF(WIN32) 77 target_link_libraries (${FN} itpp) 78 target_link_libraries (${FN} ${lapack_libs}) 105 79 target_link_libraries (${FN} ${ARGN}) ## Additional libraries can be added to a macro 106 80 ENDMACRO(EXEC) … … 108 82 MACRO(LINK_EXEC FN) 109 83 target_link_libraries (${FN} bdm) 110 IF(WIN32) 111 target_link_libraries (${FN} debug itpp_debug) 112 target_link_libraries (${FN} optimized itpp) 113 target_link_libraries (${FN} libacml_dll) 114 ELSE(WIN32) 115 IF(APPLE) 116 target_link_libraries (${FN} ${FRAMEWORK_VECLIB}) 117 ENDIF(APPLE) 118 IF(ITPP_LIBRARY_DEBUG) 119 target_link_libraries (${FN} debug itpp_debug) 120 target_link_libraries (${FN} optimized itpp) 121 target_link_libraries (${FN} lapack blas) 122 ELSE(ITPP_LIBRARY_DEBUG) 123 target_link_libraries (${FN} itpp) 124 target_link_libraries (${FN} lapack blas) 125 ENDIF(ITPP_LIBRARY_DEBUG) 126 ENDIF(WIN32) 84 target_link_libraries (${FN} itpp) 85 target_link_libraries (${FN} ${lapack_libs}) 127 86 ENDMACRO(LINK_EXEC) 128 87 … … 146 105 ) 147 106 # 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) 107 TARGET_LINK_LIBRARIES("${FN}.${MATLAB_MEX_SUFFIX}" ${MATLAB_LIBRARIES} bdm itpp ${lapack_libs}) 157 108 ## Additional libraries can be added to a macro 158 109 target_link_libraries ("${FN}.${MATLAB_MEX_SUFFIX}" ${ARGN})