Changeset 19758 for trunk/Mars
- Timestamp:
- 10/11/19 10:35:01 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/CMakeLists.txt
r19756 r19758 148 148 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ROOT_C_FLAGS}") 149 149 SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${ROOT_fortran_FLAGS}") 150 ENDIF() 151 152 # This happens when root is used from its build directory 153 IF(ROOT_VERSION AND NOT ROOT_VERSION_MAJOR) 154 # Replace separators (older version might use the '/') 155 STRING(REPLACE "/" "." ROOT_VERSION ${ROOT_VERSION}) 156 STRING(REPLACE "." ";" ROOT_VERSION ${ROOT_VERSION}) 157 # Split version string 158 LIST(GET ROOT_VERSION 0 ROOT_VERSION_MAJOR) 159 LIST(GET ROOT_VERSION 1 ROOT_VERSION_MINOR) 160 LIST(GET ROOT_VERSION 2 ROOT_VERSION_PATCH) 161 # Remove trailing 0's 162 STRING(REGEX REPLACE "0+([0-9]+)" "\\1" ROOT_VERSION_MINOR ${ROOT_VERSION_MINOR}) 163 STRING(REGEX REPLACE "0+([0-9]+)" "\\1" ROOT_VERSION_PATCH ${ROOT_VERSION_PATCH}) 150 164 ENDIF() 151 165
Note:
See TracChangeset
for help on using the changeset viewer.