File tree Expand file tree Collapse file tree 4 files changed +19
-13
lines changed
Expand file tree Collapse file tree 4 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 1919 working-directory : ${{github.workspace}}
2020 run : |
2121 mkdir -p build && cd build
22- cmake ..
22+ cmake .. -DCMAKE_BUILD_TYPE=Release
2323 cmake --build .
2424 sudo cmake --install .
2525
Original file line number Diff line number Diff line change 2626 working-directory : ${{github.workspace}}
2727 run : |
2828 mkdir -p build && cd build
29- cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix tbb)
29+ cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix tbb) -DCMAKE_BUILD_TYPE=Release
3030 cmake --build .
3131 sudo cmake --install .
3232
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.16.0)
22
3- project (dms VERSION 2.0.0 LANGUAGES CXX)
3+ project (dms VERSION 2.5.8 LANGUAGES CXX)
44
5- # set the C++ standard
5+ # Set the C++ standard
66set (CMAKE_CXX_STANDARD 20)
77set (CMAKE_CXX_STANDARD_REQUIRED ON )
88set (CMAKE_CXX_EXTENSIONS OFF )
99
10+ # Ensure optimization flags are applied only in Release mode
11+ if (CMAKE_BUILD_TYPE MATCHES "Release" )
12+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast -march=native -flto" )
13+ endif ()
14+
1015find_package (TBB REQUIRED CONFIG)
1116
1217file (GLOB SOURCES "src/dsm/sources/*.cpp" "src/dsm/utility/*.cpp" )
@@ -19,14 +24,14 @@ target_include_directories(dsm PUBLIC
1924target_link_libraries (dsm PRIVATE TBB::tbb)
2025
2126install (TARGETS dsm
22- EXPORT dsmConfig
23- ARCHIVE DESTINATION lib
24- LIBRARY DESTINATION lib
25- RUNTIME DESTINATION bin)
27+ EXPORT dsmConfig
28+ ARCHIVE DESTINATION lib
29+ LIBRARY DESTINATION lib
30+ RUNTIME DESTINATION bin)
2631
2732install (DIRECTORY ${PROJECT_SOURCE_DIR} /src/ DESTINATION ${CMAKE_INSTALL_PREFIX} /include )
2833
2934install (EXPORT dsmConfig
30- FILE dsmConfig.cmake
31- NAMESPACE dsm::
32- DESTINATION lib/cmake/dsm)
35+ FILE dsmConfig.cmake
36+ NAMESPACE dsm::
37+ DESTINATION lib/cmake/dsm)
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ To install requirements on Ubuntu:
2323``` shell
2424sudo apt install libtbb-dev cmake
2525```
26- To install requirements on MacOS :
26+ To install requirements on macOS :
2727``` shell
2828brew install tbb cmake
2929```
@@ -36,7 +36,8 @@ pip install -r ./requirements.txt
3636## Installation
3737The library can be installed using CMake. To build and install the project in the default folder run:
3838``` shell
39- cmake -B build && cmake --build build
39+ cmake -B build -DCMAKE_BUILD_TYPE=Release
40+ cmake --build build
4041sudo cmake --install build
4142```
4243Otherwise, it is possible to customize the installation path:
You can’t perform that action at this time.
0 commit comments